Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is an integer variable?
What is an integer variable?
Integer variable is a computer language. In C language, the values of integer variables can be decimal, octal and hexadecimal, but binary numbers are stored in memory. Variables, as the name implies, are variables whose values can be changed, and integer variables represent integer data.

Extended data:

classify

fundamental form

The type specifier is int, which takes up 4 bytes of memory (there may be differences between different systems, here it was originally 2, and it was verified that the windows system was 4, and so was the VAX system), and its value is a basic integer constant.

Short integer

The type specifier is short int or short' c110f1. For different compilation systems, the range of bytes and values occupied will be different. For 16 word machine, short int takes up 2 bytes, and in most 32-bit machines, short int takes up 4 bytes. But in general, short int is at least 16 bits, that is, 2 bytes.

Long integer

The type specifier is long int or long, occupying 4 bytes of memory, and its value is long integer constant. In any compilation system, long integers account for 4 bytes. Generally speaking, its range of bytes and values is the same as that of the basic type.

Unsigned type

The type specifier is unsigned. In compiling system, signed number and unsigned number are distinguished by how to interpret most significant bit in bytes. If most significant bit is interpreted as a data bit, integer data is represented as an unsigned number.