Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the difference between long integer and short integer in C language application?
What is the difference between long integer and short integer in C language application?
Long integer is long int, and the memory length is 4 bytes (32-bit binary).

Short integer is short int, and the memory length is 2 bytes (16 binary).

The Int type defaults to long int. (But the int type of ancient TC compiler used by some people in China is short int by default);

In application:

The range of numerical values that can be expressed is different. Long int has a larger range than short int.

The advantage of short int is to save memory cells.

Everything else is no different.