The following listing lists the prio rity order of operators and their associativity.
Operators Associativity () [] -> . left to right ! ~ ++ -- + - * & (type) sizeof right to left & / % left to right + - left to right << >> left to right < <= > >= left to right == != left to right & left to right ^ left to right | left to right && left to right || left to right ? : right to left = += -= *= /= %= &= ^= |= <<= >>= right to left , left to right
Unary +, -, and * have higher precedence than the binary forms.
The following listing has some examples of operator precedence
if (a&3 == 2) `==' has higher precedence than `&', thus it is evaluated as: if (a & (3==2) which is the same as: if (a&0)