int, long, long long类型的范围
类型 | 最小值 | 最大值 |
---|---|---|
unsigned int | 0 | 4294967295 (2^32 - 1) |
int | -2147483648 | 2147483647 (2^31 - 1) |
unsigned long | 0 | 4294967295 (2^32 - 1) |
long | -2147483648 | 2147483647 (2^31 - 1) |
Unsigned long long | 0 | 18446744073709551615 (2^64 - 1) |
long long | -9223372036854775808 | 9223372036854775807 (2^63 - 1) |
unsigned __int64 | 0 | 18446744073709551615 (2^64 - 1) |
__int64 | -9223372036854775808 | 9223372036854775807 (2^63 - 1) |
int, long, long long类型的范围
类型 | 最小值 | 最大值 |
---|---|---|
unsigned int | 0 | 4294967295 (2^32 - 1) |
int | -2147483648 | 2147483647 (2^31 - 1) |
unsigned long | 0 | 4294967295 (2^32 - 1) |
long | -2147483648 | 2147483647 (2^31 - 1) |
Unsigned long long | 0 | 18446744073709551615 (2^64 - 1) |
long long | -9223372036854775808 | 9223372036854775807 (2^63 - 1) |
unsigned __int64 | 0 | 18446744073709551615 (2^64 - 1) |
__int64 | -9223372036854775808 | 9223372036854775807 (2^63 - 1) |