
14 Data Structures Using C
The unary minus operator is written before a numerical value, variable or an expression. Examples
of usage of unary minus operator are:
(i) 257 (ii) 22.923 (iii) 11x (iv) 22(a*b) (v) 8*(22(a + b))
It may be noted here that the result of application of unary minus on an operand is the negation of
its operand.
The operators ‘++’ and ‘--’ are unique to C. These are called increment and decrement operators,
respectively. The increment operator ‘++’ adds 1 to its operand. Therefore, we can say that the following
expressions are equivalent.
i = i + 1 ≡ ++i;
For example, if the initial value of i is 10 then ...