C language character set, identifiers and keywords

1. C language character set
To use a certain computer language, you must use characters that conform to the language and can be used by the computer system.
The C language character set is specifically summarized as follows:
(1) English letters: 26 uppercase and lowercase letters, 52 in total.
(2) Arabic numerals: 0~9, ten in total.
(3) Underscore: _ .
(4) Other special symbols: as follows:
+, - , * , / , % , ++ , - - , < , > , = , >= ,<= , == , ! = , | , & , ! , || , && , ^ , ~ , << , >> , (), [] , {} , \ , ? , ' : ' ' . ' ' , ' ' ; '

Special symbols None. ,¥ ,$ , @ ,《 ,》 etc.
2. Identifiers
in C language are used to indicate the names of functions, types and variables.
Composition: (1): Composed of letters, underscores, and numbers. (Note: There are no special symbols)
(2): Must start with a letter, underscore.
Such as: legal identifiers: a_12 , _123 , _as13 , Aagfwgh , Aq213_b2
illegal identifiers: B12h++q , auw=12_1 , 123ahef , +12agf , /Asg12
3. Keywords
Keywords are expressions with special meanings character, cannot be used as a variable or function name, and can only be used according to system regulations.
According to the ANSI standard, the C language can use the following 32 keywords:
auto , break , case , char , const , continue , default , do
double , else , enum , extern , float , for , goto , if
int , long , register , return , short , signed , sizeof , static
struct , switch , typedef , union , unsigned , void ,volatile , while

Guess you like

Origin blog.csdn.net/weixin_74837727/article/details/128162890