Possible Duplicate:
size of int, long, etc
Is `long` guaranteed to be at least 32 bits?
I wanted to find out maximum of each data type for my computer. the code is :
int main() {
using namespace std;
cout << numeric_limits<int>::max() << endl;
cout << numeric_limits<long>::max() << endl;
cout << numeric_limits<long long>::max() << endl;
return 0;
}
which prints:
2147483647
2147483647
9223372036854775807
question 1: why int
and long
are same?
question 2: above output is from VS2010 on 64bit. Is my c++ program running as 64bit?