C language legal constant
A, legal, decimal constant: numerical sequence, optional, numerical sequence. B, 0 1aa is illegal, which does not mean that the character a. C. e5 is illegal. C language grammar stipulates that there must be a number before the letter e or e, and the index after e or e must be an integer.

Symbolic constants: constants are represented by identifiers. In C language, a constant can be represented by an identifier, which is called a symbolic constant.

Character constants can be ordinary characters (such as x), escape sequences (such as \t) or ordinary characters (such as \u02C0).

Constants in C language are fixed values and cannot be modified by programs. Constants can be of any data type, as shown in the following example: data type. C language also supports another constant with a predefined data type, namely string. All string constants are enclosed in double apostrophes, such as Thisisatest.

B, 08 1, which is illegal. 10 decimal number cannot be preceded by 0. If the first digit is 0, it means that this number is octal. But in octal numbers, there can't be 8 (8 will carry and become 10), so this is wrong. If it is 16, 0x8 1, this is correct.

Because it is hexadecimal, it must start with 0x. Item c starts with 0, which means octal, but the x at the end is illegal. Item D starts with 0x, which means 16, so f means 15, which is legal. The l at the end stands for long, which means that this constant is a long integer.