What is the value range of int in C++?
In standard C++, the byte length of int is less than long and greater than short. On most platforms, int is 4 bytes (32 bits, not 16 bits! ), so the range that can be expressed is 2 to the 32nd power, and the value is-2 (32-1) ~ 2 (32-1)-1(that is, -2 3 1 ~ 2 36544). Int includes the following definitions: unsigned short int unsigned 2 bytes short integer short int signed 2 bytes short integer-32768 ~ 32767 unsigned int unsigned 4 bytes integer 0 ~ 2 32- 1 (this is correct). Int 4-byte shaping-231~ 231int64 64-bit (8 bytes) shaping -2 63 ~ 2 63- 1 (this is rarely used, usually expressed as high-order int and low-order int, and the range of Bayesian arc is also displayed.