Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What are the types of constants in C language?
What are the types of constants in C language?
Constants in C language can be divided into integer constants, real constants, character constants and string constants.

There are also symbolic constants and famous constants.

Integer, for example:-123, 0xff (hexadecimal), 022 (octal)

Real types, such as: 3. 14, 3. 14f (single essence), 3. 14lf (double essence), 1.2e04 (science).

Character constant, "a"

String constant, "abc 123"

Escape character constant' \0' "\n "

Macro definition identifier constant # define2.7 1

E in the program will be replaced by 2.7 1 at compile time.

Logical constant TRUE (in fact, it is also a macro definition constant)

This is probably ...