HP C A.06.05 Reference Manual
Expressions and Operators
Operator Precedence
Chapter 5 135
Operator Precedence
Precedence is the order in which the compiler groups operands with operators. The C
compiler evaluates certain operators and their operands before others. If operands are not
grouped using parentheses, the compiler groups them according to its own rules.
The following lists C operator precedence in
highest
to
lowest
precedence:
Table 5-14 C Operator Precedence
Class of operator Operators Grouping
primary () [] -> . left to right
unary (type casting)
sizeof
& (address of)
* (dereference)
- (reverse sign)
~ !
++ --
right to left
multiplicative * / % left to right
additive + - left to right
shift << >> left to right
relational < <= > >= left to right
equality == != left to right
bitwise AND & left to right
bitwise XOR ^ left to right
bitwise OR | left to right
logical AND && left to right
logical OR || left to right