First, the key words:
The keyword is a word that has been used by the C language itself and cannot be used for other purposes. For example, a keyword cannot be used as a variable name, function name, etc.
c keyword Total 32 keywords, such as the common int struct break enum and so on
Keywords are divided into two main categories: one is the data type keyword, the other is the Process Control statement key word
For example:
Two, the indicator
Identifiers are used to identify the names of an object in the source program, which can be statements, data types, functions, variables, constants, arrays, and so on.
Naming rules for identifiers (laws that must be followed): only letters, numbers, underscores, or $ symbols, and can only start with a letter or underscore, and you cannot use keywords as identifiers.
Naming conventions for identifiers: 1> a meaningful name for future reading and maintenance
2> Hump nomenclature ( Hump nomenclature is a unique identifier that is formed when a variable name or function name is linked together by one or more words, and the first word starts with a lowercase letter,
Capitalize the first letter of two words, or the first letter of each word in uppercase letters)
Third, note
(1) Note to explain the meaning of the code, improve the readability of the program, the comments out of the content will not participate in the compilation. Notes are written for programmers to see and facilitate communication between colleagues.
(2) Symbols for annotations
- Single-line comment//
- Multiline Comment/* */
(3) You can use annotations to check the function of the code (before and after the control), you can use comments to debug (because the compiler error is sometimes inaccurate, and an error often raises multiple errors)
(4) Nesting of annotations
①. Single-line comments can nest single-line comments, multiline comments
②. Multiline comments can nest single-line comments
③. Multiline comments can not nest multiple lines of comments
(5) Pay attention to printf ("//abc"); here//in double quotation marks is part of a string rather than a comment.
C language keywords, identifiers and annotations