Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Among the plastic data types, () A, short B, long C, int D and byte require the least memory space. What should I choose and why?
Among the plastic data types, () A, short B, long C, int D and byte require the least memory space. What should I choose and why?
Bytes, one byte (eight binary bits)

Extension: 2 bytes shorter at the same time (16 binary bits, that is, 2 octets)? Int, four bytes? 8 bytes long

Type? Length (bits)? range

Char (character) 8? ASCII character

Unsigned char (unsigned character) 8? 0~255

Signed character (signed character type) 8? ? - 128~ 127

Int (integer)? 16 -32768~32767

Unsigned int 16? 0~65535

Signature int 16? Same int

Short int? 8 - 128~ 127

Unsigned short integer? 8 ? 0~255

Signed short integer? 8-band short integer

Long int (long integer) 32? -2 147483648~2 147483649

Signature long int 32-2147483648 ~ 2147483649

Unsigned long integer? 32 0~4294967296

Float (single precision type)? 32 ? It is accurate to about six figures.

Double (double precision type) 64 is accurate to about 12 digits.