整数值的范围Range of Integer Values

ANSI 3.1.2.5:各种类型的整数值的表示形式和集ANSI 3.1.2.5 The representations and sets of values of the various types of integers

整数包含 32 位(4 个字节)。Integers contain 32 bits (four bytes). 带符号整数以 2 的补数的形式表示。Signed integers are represented in two's-complement form. 最高有效位保存符号:1 表示负数,0 表示整数或零。The most-significant bit holds the sign: 1 for negative, 0 for positive and zero. 下面列出了这些值:The values are listed below:

类型Type 最小值和最大值Minimum and Maximum
unsigned shortunsigned short 0 到 655350 to 65535
signed short -32768 到 32767-32768 to 32767
unsigned long 0 到 42949672950 to 4294967295
signed longsigned long -2147483648 到 2147483647-2147483648 to 2147483647

请参阅See Also

整数Integers