Several books
C language programming, C and pointer, C expert programming, C traps and defects, C primer plus
32 keywords
Loop Control 12: break, continue, for, goto, if, else, switch, do, while, case, default, return
Data Type 14: char, int, long, float, double, short, enum, signed, unsigned, typedef, union, volatile (variables can be implicitly changed during program execution ), void, struct
Operator: sizeof,
Storage Class description 5: auto (local variable), const, extern (global variable described in the module), register (variable stored inside the CPU), static (static variable ),
I. Advantages: small amount of code, fast, and powerful functions
Disadvantages: high risk, long development cycle, weak portability
2. bytes are the unit of storage data and the minimum unit that can be accessed by hardware.
Printf ("% x \ n", x );
Printf ("% X \ n", x );
Printf ("% # X \ n", x); Recommended
Scanf ("m % d", & I); input m
While (ch = getchar ())! = '\ N') Processing of invalid continue Input
3. The priority of operators ranges from strong to weak: arithmetic, relational, logical, and value assignment.
Division: 16/5 = 3,-13/5 =-2,
Remainder:-13% 3 =-13%-3 = 1 The calculation object is an integer, And the symbol is the same as the remainder.
Float variable x 0 | x-0.000001 | <= 0.000001 Number of smallest values
& When the expression on the left is false, the expression on the right is not executed (non-zero indicates true, zero indicates false)
| If the expression on the left is true, the expression on the right is not executed.
4. char can only define one single character. char * defines a character pointer pointing to a String constant char * p = "Hello World"
If else is a statement with a return value of 1221, the floating point number cannot be accurately stored, for example, 123456.789 to 123456.789063.
The number is generally represented by cnt, and the average is generally expressed by avg.
For (1; 2; 3)
For (4; 5; 6)
A;
B; // B is not in two loops
5. Auto-increment and auto-increment are separated into one statement. Do not use it as part of a compound statement.
The value of the overall expression of I ++ is the value before I is added to 1. The three-object OPERATOR:? B: C
The comma expression (A, B, C,) is executed from left to right. The overall value is the value of C.
Do {} while (expression); add a space before % c in the scanf statement for the value of Characters in the expression
Case is the entry of the program. If it is found, other entry will be blocked. If it is not break, other case statements will be executed.
Break cannot be used directly for if unless it is part of a loop and is used to terminate the loop and switch statements.
Continue is used to determine whether to execute the next loop.
6. the Referer in the linked list reduces the number of comparisons. It is an additional linked list node that does not store anything. The first element of a linear table is the second node of the linked list.
Elements in a one-dimensional array: continuous allocation, the same type, and the same bytes
Int a [4] = {0} Initialization