|
My understanding, printf shows the value of the variable after executing this statement, so it is easy to understand
printf ("% d,% d", i, i ++); // This situation is shown as: 3,2-at the beginning i = 2, after executing this statement, i = 3 because of i ++, but The value of i ++ expression is still 2
printf ("% d,% d", i, ++ i); // This case is displayed as: 3,3-After executing this statement i = 3, (++ i) = 3
The explanation of the last two sentences is similar to the previous two sentences, and the result is no problem.
printf ("% d,% d", i ++, i); // This case is displayed as: 2,3
printf ("% d,% d", ++ i, i); // This case is displayed as: 3,3 |
|