原文地址:https://blog.csdn.net/shiwei408/article/details/7280296
32位系统下,int、long、long long、__int64所占字节数和取值范围
字节数
char: 1字节(8位)
int: 4字节 (32位,取值范围 -2^31 ~ 2^31-1)
unsigned int : 4字节 (32位,取值范围 0 ~ 2^32-1)
long: 4字节 (32位,取值范围 -2^31 ~ 2^31-1)
unsigned long : 4字节 (32位,取值范围 0 ~ 2^32-1)
long long : 8字节(64位,取值范围 -2^63 ~ 2^63-1)
取值范围
int : -2147483648 ~ 2147483647
unsigned int : 0 ~ 4294967295
long : -2147483648 ~ 2147483647
unsigned long : 0 ~ 4294967295
long long : -9223372036854775808 ~ 9223372036854775807
unsigned long long : 0 ~ 1844674407370955161
__int64 : -9223372036854775808 ~ 9223372036854775807
unsigned __int64 : 0 ~ 1844674407370955161