Programming Tools Guide
Chapter 3, C language compiler

Associativity and precedence of operators

Associativity and precedence of operators



 -------------------------------------------------
 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 their binary versions.

Prefix ++ and -- have higher precedence than their postfix versions.