Conditional operator, the only ternary operator in C language, has the general form of Exp 1? Exp2:Exp3
Exp 1, Exp2 and Exp3 are three expressions. The calculation rules of conditional operators are as follows: first, calculate the value of Exp 1, and if it is true, calculate the value of Exp2 as the result of the expression; If false, the value of Exp3 will be calculated as the result of the expression.
Comma operators: Exp 1, Exp2 ... Expn calculated in turn, and the last Expn value is the result of the expression.
Look at the result of the second expression in the third line of brackets as the result of the whole expression in brackets. According to the sequence of operators,
In the fourth line, the value of m has not changed because the condition is true. So m takes 1.
Mathematics teacher's class experience 1
On March 2 1 day, I was lucky enough to participate in the class eval