Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Why in the basic data type of C language, the character type accounts for 1 byte, the shaping accounts for 2 bytes, and the single precision and double precision account for 4 8 bytes respectively?
Why in the basic data type of C language, the character type accounts for 1 byte, the shaping accounts for 2 bytes, and the single precision and double precision account for 4 8 bytes respectively?
ASCII code mainly considers characters. ASCII code has 8 bits, the highest bit is not needed, at most 128 characters, and there are some invisible characters, one byte is enough. For integer and different precision types of data, considering the data range used in programming and choosing different types according to the possible range of data can effectively improve the efficiency of the program. It is very time-consuming for the processor to process double-precision data.