1, operator precedence and associativity
++and-operators have higher priority than+and-,and they are all combinations of pairs.
2. Before++and after++operators
Before++,that is ++a, the result of the expression is the increased value of A..
Postposition++means a++, and the result of the expression is the value before A is increased.
Title: A-B++C++
1, first put parentheses according to priority.
(a - )-(b++)+(c++)
2, the brackets are calculated first, and they are all postposition++operators, and the results are all the results before self-increment.
2-2+2
3. The final result is 2.
4. At the same time, A passes-,B and C both pass++,a= 1, b=3, c=3.
5. The code above is disassembled.
a-b+ c;
a-;
b++;
c++;