Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How many digits is int?
How many digits is int?
According to different compilers, the number of bytes defined by int is different. (The memory size occupied by data is different)

Commonly used single-chip compiler, such as KEIL, in the C language of 5 1 single-chip, int stands for 2 bytes (16 bits); If it is C language of 32-bit RAM processor, int stands for 4 bytes (32 bits).

In the C language of PIC bit series MCU, int stands for 16 bit.

Many compilers of PC-side software will define int as 8 bytes (64 bits) according to the operating system or processor (such as 64-bit XP).

So people who program on multiple platforms need to pay attention when using it.

If you need to define 16 digits, you can use short (short integer and short integer) definition.