C语言的整型溢出问题——各变量类型的取值范围

类型名称 ----------------字节数 ------------------------------- 取值范围
signed char ---------------1 --------------------------------- -128~+127
short int ------------------- 2 ------------------------------ -32768~+32767
int --------------------------- 4 ---------------------- -2147438648~+2147438647
long int -------------------- 4 ---------------------- -2147438648~+2141438647
long long ------------------ 8 ----- -18446744073709600000~+18446744073709600000
long long long int ------ 8 ------- -9223372036854775808~+9223372036854775807

https://blog.csdn.net/qq_16234613/article/details/77541722
https://coolshell.cn/articles/11466.html
https://blog.csdn.net/njsssch/article/details/6543821

猜你喜欢

转载自blog.csdn.net/qq_38993096/article/details/88374121
今日推荐