HP C A.06.05 Reference Manual

Expressions and Operators
Operator Precedence
Chapter 5136
Precedence among Operators of Same Class
Most operators group from the left to the right but some group from the right to the left. The
grouping indicates how an expression containing several operators of the same precedence
will be evaluated. Left to right grouping means the expression
a/b * c/d
behaves as if it had been written:
(((a/b)*c)/d)
Likewise, an operator that groups from the right to the left causes the expression
a = b = c
to behave as if it had been written:
a = (b = c)
conditional ?: right to left
assignment = += -= *=
/= %= >>= <<=
&= ^= |=
right to left
comma , left to right
Table 5-14 C Operator Precedence (Continued)
Class of operator Operators Grouping