Increment/Decrement Operators
Avoid using the ++ and -- operators in complex expressions in which the variables they are applied appear more than once:
x = 5; i = 2;
y = i * x + ++i;
is y assigned the value 13 or 18?
Previous slide
Next slide
Back to first slide
View graphic version