// // This program prints out on STDOUT the size of different variable types // Emiliano Mocchiutti // #include using namespace std; // needed to use "cout" // main, no input required, returns 0 always int main(){ cout << "bool:\t\t" << sizeof(bool) << " bytes\n"; cout << "char:\t\t" << sizeof(char) << " bytes\n"; cout << "wchar_t:\t" << sizeof(wchar_t) << " bytes\n"; cout << "short:\t\t" << sizeof(short) << " bytes\n"; cout << "int:\t\t" << sizeof(int) << " bytes\n"; cout << "long:\t\t" << sizeof(long) << " bytes\n"; cout << "long long:\t\t" << sizeof(long long) << " bytes\n"; cout << "float:\t\t" << sizeof(float) << " bytes\n"; cout << "double:\t\t" << sizeof(double) << " bytes\n"; cout << "long double:\t" << sizeof(long double) << " bytes\n"; return 0; }