Expressions with Unary Operators

Unary operators act on only one operand in an expression. The unary operators are:

These operators have right-to-left associativity.

Syntax

unary-expression :

postfix-expression
++unary-expression
––unary-expression
unary-operator cast-expression
sizeof .unary-expression
sizeof ( type-name )
allocation-expression
deallocation-expression

unary-operator : one of

* & + – ! ~