# Include <stdio. h> main (I = j =; k = I ++; m = ++ j; printf (
Auto-increment or auto-increment can be divided into two types:
- I ++ ----> post auto-Increment
- ++ I ----> auto-Increment
Their similarities are that, whether post-auto-increment or pre-auto-increment, the I value is increased by 1.
In the above Code, I = j = 3, and the values of I and j are both 3. No matter ++ j or I ++, the final value adds 1 to the value of I or j, therefore, the output result is: I = 4; j = 4;
Differences:
The value of post-auto-incrementing I ++ is the value before I + 1, and the value of pre-incrementing ++ I is the value after I + 1;
In the above Code
K = I ++, I ++ is post-auto-increment, k is equal to the value before I + 1, I is 4, and I is 3 before I + 1, so k = 3
M = ++ j, ++ j is the First Auto-increment, and the value of j is equal to the value after j + 1, so m = 4, the value after j + 1 is 4