Value range of int
The value range of int varies from machine to machine. In a machine with 16 bits, int occupies 16 bits, one of which is a sign bit, so the value range is -32768 ~ 32767. In 32-bit and 64-bit machines, int occupies 32 bits, and its value range is-2147483648 ~ 2147483647. In addition, the memory space occupied by int type in C language also affects the value range of int. In c language, the memory space occupied by int type is 4 bytes, that is, 32 bits, so its value range is-2147483648 ~ 2147483647. In a word, the value range of int depends on the number of bits in the computer system and the memory space occupied by int type in programming language. But in any case, the value range of int must be greater than or equal to -32767 to 32767.