What is an integer constant?
Integer variables can be divided into the following categories: 1 The basic type descriptor is int, occupying 2 bytes of memory, and the value is a basic integer constant. 2. The short integer type specifier is short int or short' c110f1. The range of bytes and values occupied is the same as that of the basic type. 3. The long integer type specifier is long int or long, accounting for 4 bytes in memory, and its value is long integer constant. 4. The unsigned type specifier is unsigned. Unsigned types can match the above three types: (1)unsigned basic type descriptors are unsigned int or unsigned. (2) The unsigned short integer type specifier is an unsigned short integer; (3) The unsigned long type specifier is an unsigned long. The number of bytes occupied by various unsigned types is the same as that of the corresponding signed types. However, because the sign bit is omitted, it cannot represent a negative number. The following table lists the number of memory bytes allocated by various integer quantities in Turbo C and the representation range of this number. The number of type descriptors ranges from 32768 to 32767 ■■■ short int-32768 to 32767 ■■■ signed int-32768 to 32767 ■■■■ unsigned int 0 to 65535 ■■■■■ long int-2147483644. 7483647 ■■■■ Unsigned Long 0 ~ 4294967295 ■■■■ The general forms of variable description of integer variables are: type specifier, variable name identifier, ...; For example: int a, b, c; (a, b and c are integer variables) long x, y; (x, y are long integer variables) unsigned p, q; (p, q is an unsigned integer variable) Defines the format of integer variables as follows: integer type, 1 variable names or multiple variable names, separated by commas. Similarly, unsigned int and unsigned long variables can be defined. Defining a variable means allocating a corresponding size of storage space for the variable in memory, and at the same time determining the storage mode and possible operations of the variable value.