"x++" and "++x" are
"x++" takes the value of "x", then increments "x" by one, but returns the original value.
x = 6;
a = x++;
ends up with "a" containing 6, and "x" containing 7.
"++x" increments the value of "x" and then returns the new value.
x = 6;
a = ++x;
ends up with "a" containing 7, and "x" containing 7.
Although each parameter for
is evaluated separately, they do not have to be evaluated in the left-to-right order you wrote them, hence the odd looking values in your first line.
The others are obvious: a enters as 5, is incremented the the first one after the value is used, enters the second as 6 and is incremented before the value is used and "7" printed. It then enters the third as 7 and is decremented after the value is used, so enters the final one as 6, which is decremented before it is used so it is printed as "5".