c语言考试总结知识(C language test summary)
The whole must be clear:
the program structures are three kinds: sequence structure Master the integer is two bytes, the character is a byte, double precision is 4 bytes can be.
escape character test:
In the program int a = 0x6d, is a sixteen hexadecimal number to the variable a the Ox must exist.
In the program int a = 06D is an octal form.
In the escape character, 'm' is legal, 0 cannot be written, and X is a lowercase.
"A" is legitimate, the 0 is not written.
"8" is illegal, because there will be 8.
arithmetic operator priority level:
Some of the same level from left to right, some from right to left.
compulsory type conversion:
Is (int) a int (a), not pay attention to have the type of brackets.
Note (int) (a+b) and (int) a+b difference. The a+b before the transition, after the a transformation and B.
expression test:
Is there must be a numerical expression.
Assignment: the expression values are numerical, the left most a=b=5: the expression is 5, constants can be assigned.
Since, since the reduction expression: if a=5, ++a (for 6), a++ ⑸;
Operation mechanism: ++a is the first variable value plus 1, and then get into numerical variables in a, and then use this
A numerical ++a expression was 6, while the a++ is to use the numerical expression is 5, then the value of a plus 1 to 6,
Put them in the variable a. The ++a and a
c语言考试总结知识Clanguagetestsummary 来自淘豆网www.taodocs.com转载请标明出处.