Precedence and Associativity of Operators
From <The C Programming Language>(p.53)
 
| 
 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.
 
                    
                
                
            
        
浙公网安备 33010602011771号