![]() |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The table below summarizes the rules for precedence and associativity
of all operators, including those which we have not yet discussed.
Operators on the same line have the same precedence, rows are in order
of decreasing precedence, so, for example, *
, /
and %
all have the same precedence, which is higher than that of +
and
-
.
Note that the precedence of the bitwise logical operators &
,
^
and |
falls below ==
and !=
. This implies
that bit-testing expressions like
if ((x & MASK) == 0) ... |
must be fully parenthesized to give proper results.