Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the difference between integer constants and integer variables in C language? for instance
What is the difference between integer constants and integer variables in C language? for instance
Integer constants: Integer constants in C language programs can be divided into decimal integer constants, octal integer constants and hexadecimal integer constants.

1, the decimal integer constant consists of a series of numbers from 0 to 9.

2. Octal integer constants start with the number 0, where the number is 0~7.

3. Hexadecimal integer constants begin with the number 0X or 0x, where the number can be a number from 0 to 9, a to f or a to f or English letters.

Integer variables: Integer variables are variables used to store integer values.

Classification can be divided into:

Short integer

Signature short

Internationalorganizations (same as international organizations)

Basic integer

sign

Internationalorganizations (same as international organizations)

Long integer

Signature dragon

Internationalorganizations (same as international organizations)

Unsigned short integer

Unsigned

short

Internationalorganizations (same as international organizations)

Unsigned basic integer

Unsigned

Internationalorganizations (same as international organizations)

Unsigned length shaping

Unsigned

long

Internationalorganizations (same as international organizations)

When you define a variable, you can assign an initial value to it, which is called initialization of the variable.