C language is a powerful and concise computer language. It can be used to write programs and instruct computers to complete specified tasks. We can learn a lot about C Programming books. First, I learned the basic knowledge about C language.
C Language Vocabulary
The words used in C language are divided into six categories: identifiers, keywords, operators, delimiters, constants, and comments.
1. identifier
Variables, function names, and labels used in a program are collectively referred to as identifiers. Except that the function name of the library function is defined by the system, other functions are customized by the user. C stipulates that the identifier can only be A letter (~ Z, ~ Z), number (0 ~ 9), a string composed of underscores (), and the first character must be a letter or underline.
The following identifiers are valid:
A, x, _ 3x, BOOK_1, sum5
The following identifier is invalid:
3 s starts with a number
S * T contains invalid characters *
-3x starts with a minus sign
Invalid bowy-1 character-(minus sign)
Note the following when using identifiers:
(1) Standard C does not limit the length of identifiers, but it is limited by the C language compilation systems of various versions and by specific machines. For example, in a version C, the first eight digits of the identifiers are valid. If the first eight phases of the two identifiers are the same, they are considered to be the same identifiers.
(2) there are differences in the case of identifiers. For example, BOOK and book are two different identifiers.
(3) Although the identifier can be defined by the programmer at will, it is a symbol used to identify a certain amount. Therefore, the name should be meaningful as much as possible for reading and understanding ".
2. Keywords
A keyword is a string of specific meaning specified by the C language. It is also known as a reserved word. User-Defined identifiers should not be the same as keywords. Keywords in C are classified into the following types:
(1) type specifiers
Defines and describes the types of variables, functions, or other data structures. Such as int and double used in the previous example.
(2) Statement specifiers
Indicates the function of a statement. For example, if else used in example 1.3 is the statement Definition character of the Condition Statement.
(3) pre-processing command words
Used to represent a preprocessing command. For example, include is used in the previous examples.
3. Operators
The C language contains rich operators. Operators and variables and functions form expressions together to represent various computing functions. An operator consists of one or more characters.
4. Separator
The separators used in the C language are comma and space. Commas (,) are used to separate variables in the type description and function parameter table. Multiple spaces are used as separators between words in a statement. In the keyword, there must be more than one space character interval between identifiers, otherwise there will be a syntax error, such as writing int a; into inta; the C compiler treats inta as an identifier and the result will inevitably go wrong.
5. Constants
Constants used in C can be divided into numeric constants, character constants, string constants, symbol constants, and escape characters. In the second chapter, we will give a special introduction.
6. annotator
The C-language annotator is a string starting with "/*" and ending. Comments between "/*" and. During program compilation, no comments are processed. Annotations can be output anywhere in the program. A comment is used to indicate or explain the meaning of a program to the user. In the debugging program, temporarily unused statements can also be included in comments so that translation skipping is not processed. After debugging, the comments are removed.
There are still a lot of books on C Language similar to knowledge. You can find and learn it, or you can watch my updated content with me. Of course, you have to systematically learn it when learning, the materials I sent may not be the system's learning content.