3.4.10 Priority of operators

The priority and linking order of operators affect operand grouping and evaluation for expressions. The priority of operators is meaningful only when there are operators with different priorities in the same expression. If the expression contains a higher-priority operator, the operator is evaluated first. If operators have the same priority, the order in which to evaluate them depends on their linking order.

The following table shows the priority and linking order of the operators. The following arrangement shows the operators in descending priority order.

SymbolOperatorLinked:
( )ParenthesesFrom the left to the right
+ - !Unary operatorsFrom the right to the left
* / %Multiplying operatorsFrom the left to the right
+ -Adding operatorsFrom the left to the right
< > <= >=Comparison operatorsFrom the left to the right
== !=EqualityFrom the left to the right
&Bitwise ANDFrom the left to the right
|Bitwise ORFrom the left to the right
&&Logical ANDFrom the left to the right
||Logical ORFrom the left to the right
=AssignmentFrom the left to the right