#include <iostream>
int main()
{
double d_var = 90;
int var = 5;
char c_var = 'a';
cout << &var << " stored value " << var << " " << sizeof(var) << endl;
cout << c_var << " stored value " << c_var << " " << sizeof(c_var) << endl;
cout << &d_var << " stored value " << d_var << " " << sizeof(d_var) << endl;
cout << "Size of short int : " << sizeof(short int) << endl;
cout << "Size of long int : " << sizeof(long int) << endl;
cout << "Size of signed long int : " << sizeof(signed long int) << endl;
cout << "Size of unsigned long int : " << sizeof(unsigned long int) << endl;
cout << "Size of float : " << sizeof(float) << endl;
cout << "Size of wchar_t : " << sizeof(wchar_t) <<endl;
return 0;
}
Comments
Post a Comment