Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Difference between int and short in c language data type
Difference between int and short in c language data type
(1)C/C++ specifies that the length of int is the same as that of machine;

(2) The word length of the operating system and the machine may be inconsistent;

(3) the compiler defines the word length of int according to the word length of the operating system;

Whether the integer variable is 32 bits is not only related to the specific CPU architecture, but also related to the compiler, so int can be 32 bits or 16 bits, and short is a short integer variable, which can only be 16 bits.