Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the memory size of integer and real character types when programming in C language? How is the memory divided when numbers are converted between different types? illustrate
What is the memory size of integer and real character types when programming in C language? How is the memory divided when numbers are converted between different types? illustrate
First, different compilers specify data types of different sizes in memory. Generally, take vc6.0 as an example, short integer 2 bytes, int 4 bytes, long bytes, char 1 byte. When numbers are converted between types, for example, from int to double, int only points to the lower 8 bits of double.