User manual

mikroC PRO for dsPIC
MikroElektronika
247
4. Either expression1 or expression2 is a pointer to an object or incomplete type and the other is a
pointer to a qualied or unqualied version of void. The type pointed to by left has all qualiers of the type
pointed to by right.
5. expression1 is a pointer and expression2 is a null pointer constant.
Unary Operators
Unary operators are operators that take exactly one argument.
Unary Arithmetic Operators
Unary operators ++ and -- are the only operators in C which can be either prex (e.g. ++k, --k) or postx (e.g. k++,
k--).
When used as prex, operators ++ and -- (preincrement and predecrement) add or subtract one from the value of the
operand before the evaluation. When used as sufx, operators ++ and -- (postincrement and postdecrement) add or
subtract one from the value of the operand after the evaluation.
Operator Operation Precedence
+ unary plus does not affect the operand 14
- unary minus changes the sign of the operand 14
++ increment adds one to the value of the operand.
Postincrement adds one to the value of the operand
after it evaluates; while preincrement adds one
before it evaluates
14
-- decrement subtracts one from the value of the
operand. Postdecrement subtracts one from
the value of the operand after it evaluates; while
predecrement subtracts one before it evaluates
14
For example:
int j = 5;
j = ++k; /* k = k + 1, j = k, which gives us j = 6, k = 6 */
but:
int j = 5;
j = k++; /* j = k, k = k + 1, which gives us j = 5, k = 6 */