Variable increment (++) and decrement (--) operators come in two flavors: prefix and postfix. These unary operators have the side effect of changing the value of the arithmetic operand, which must evaluate to a variable. Depending on the operator used, the variable is either incremented or decremented by 1.
These operators are very useful for updating variables in loops where only the side effect of the operator is of interest.
Prefix increment operator has the following semantics:
++i adds 1 to i first, then uses the new value of i as the value of the expression. It is equivalent to the following statements.
i += 1; result = i; return result;
Postfix increment operator ...