Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The difference between integer variables and real variables in C language
The difference between integer variables and real variables in C language
Integer variables can only store integer data, and different types of variables have different storage ranges. The storage types of integer variables mainly include short integer (accounting for 2 bytes), basic integer int (accounting for 4 bytes) and long integer long (accounting for 4 bytes).

Real variables can store a wide range of data, as the name implies, real numbers. Of course, integers are also real numbers and can also be stored. The storage types of real variables mainly include single-precision floating point float (accounting for 4 bytes) and double-precision floating point double (accounting for 8 bytes).

Note: The number of bytes occupied by the above variables was tested on a 32-bit computer.

Other variable types include char, structure, enumeration type, * * topic, etc.