Go Up to Postfix Expression Operators Index
Increment operator ( ++ )
postfix-expression ++ (postincrement) ++ unary-expression (preincrement)
The expression is called the operand. It must be of scalar type (arithmetic or pointer types) and must be a modifiable lvalue..
The value of the whole expression is the value of the postfix expression before the increment is applied.
After the postfix expression is evaluated, the operand is incremented by 1.
The operand is incremented by 1 before the expression is evaluated. The value of the whole expression is the incremented value of the operand.
The increment value is appropriate to the type of the operand.
Pointer types follow the rules for pointer arithmetic.
Decrement operator ( -- )
postfix-expression -- (postdecrement) -- unary-expression (predecrement)
The decrement operator follows the same rules as the increment operator, except that the operand is decremented by 1 after or before the whole expression is evaluated.