C++ Program to Find Size of int, float, double and char .
C++ programs:
Source code:
// C++ Program to Find Size of int, float, double and char .
#include <iostream>/* iostream provides basic
input and output services for C++ programs */
using namespace std;
int main() // Th execution of program start with the main function
{ // char, int, float, double is the data type
cout << "Size of char: " << sizeof(char) << " byte" << endl;
cout << "Size of int: " << sizeof(int) << " bytes" << endl;
cout << "Size of float: " << sizeof(float) << " bytes" << endl;
cout << "Size of double: " << sizeof(double) << " bytes" << endl;
return 0;
}
0 Comments