类型名称 字节数 取值范围
signed char 1 -2^7 ~ 2^7-1 -128~+127
short int 2 -2^14 ~ 2^14-1 -32768~+32767
int 4 -2^31 ~ 2^31-1 -2147483648~+2147483647
unsigned int 4 0 ~ 2^32-1 0 ~ 4294967295
long int 4 -2^31 ~ 2^31-1 -2147483648~+2141483647
unsigned long 4 0 ~ 2^32-1 0~4294967295
long long int 8 -2^63 ~ 2^63-1 -9223372036854775808~+9223372036854775807
unsigned long long 8 0 ~ 2^64-1 18446744073709551615
__int64的最大值:9223372036854775807
__int64的最小值:-9223372036854775808
unsigned __int64的最大值:18446744073709551615
short, int, long, long long各个类型的范围
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
byte、short、int、long、double、float数组转listJAVAUTILS java 封装类 基本数据类型