Actually, that's incorrect. On most compilers long = long long, not int.
Code:int main(){ cout << sizeof(char) << endl; cout << sizeof(short) << endl; cout << sizeof(int) << endl; cout << sizeof(long) << endl; cout << sizeof(long long) << endl; return 0; }Code:1 2 4 8 8




Reply With Quote