$5 operators and expressions
(1) Automatic type conversion and forced type conversion
(Ii) Arithmetic expression
-
'*', /,% have higher priority than +,-
-
When the precedence of arithmetic operators is the same, the associative direction is "from left to right"
(Iii) Increment and decrement operator
(Iv) Relational operators and expressions
The relational operators <, <=, >, >= have the same precedence, == and! = Has the same precedence, and the precedence of the first four operators is higher than that of the latter two, and the associativity is from left to right.
(V) Logical operators and expressions
(Vi) Comma operator
Operator precedence and associativity
$6 Data input/output function
(I) Statement
-
Expression statements
such as:
-
Function call statement
such as:
-
Empty sentence A sentence
consisting of only ";".
-
Control statement
-
Compound sentence
(Ii) Input/output
input Output:
-
Character input/output functions getchar() and putchar()
-
Format input/output functions scanf() and printf()
- printf()
- scanf()
-
String input / output functions
- the puts () (determined in the character '\ 0' terminator, terminator is encountered, is no longer behind the characters and outputs wrap)
- the gets ()
Sequence programming application
Sequential program structure: execute in order of program order; execute in sequence according to the order of statements, without jumps and loops.
Reference books:
Introduction to C language development and actual project combat