【发布时间】:2022-01-21 02:01:04
【问题描述】:
我知道 integer 的范围是 -2147483648 到 2147483647,long 的范围是 -9223372036854775808 到 9223372036854775807 但是 long 的范围是多少int有吗?
【问题讨论】:
-
long和long int是一回事。int是可选的。 -
这能回答你的问题吗? Long Vs. Int C/C++ - What's The Point?
-
当使用
signed、unsigned、long或short中的任何一个时,可以省略int。long和long int意思完全一样。 -
“我知道
long的范围是-9223372036854775808到9223372036854775807”。仅当long为 64 位时。它可以是 32 位。 -
integer has a range of -2147483648 to 2147483647 and a long has the range of -9223372036854775808 to 9223372036854775807C 和 C++ 标准没有为任何内置类型指定任何特定大小。唯一的要求是int至少有 16 位,long至少有 32 位:What does the C++ standard state the size of int, long type to be?
标签: c integer long-integer