Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The problem of character constants in C language
The problem of character constants in C language
Answer B.

Option A is a string constant: a string constant is a sequence of characters enclosed in a pair of double quotation marks.

Option b is a character constant: a character constant is a character enclosed in single quotation marks.

For example:' a',' b',' =','+','?' Is a legal character constant. C also allows a special form of character constant, which is a sequence of characters starting with "\".

In C language, character constants have the following characteristics:

Character constants can only be enclosed in quotation marks, not in double quotation marks or other brackets.

Character constants can only be a single character, not a string.

This character can be any character in the character set. However, after numbers are defined as character types, they cannot participate in numerical operations. For example,' 5' and 5 are different. "5" is a character constant and cannot participate in the operation.

The c option is an integer constant.

The d option can be an identifier and defined as a variable.

Please accept the answer and support me.