++/--, Examples
int x, y;
x = 4;
y = --x; /* y gets 3 */
x = 1; y = 4;
z = --y == 3
&& !(x++ <=1);
/* --y is 3, --y==3 is true, x++ increases x by 1, the value of the expression x++ is 1 (not 2), (x++ <= 1) is true. !(x++ <= 1) is false. True && false is false. So z gets 0. */
These are examples 3.7.4 and 3.7.5, on page 105.
Previous slide
Next slide
Back to first slide
View graphic version