Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
| Level | Operator | Associativity |
|---|---|---|
| 1 | () (parentheses), [] (array element), . (structure member reference) | Left to right |
| 2 | - (negative sign), ++ (increment), -- (decrement), & (address-of), * (pointer indirection), sizeof(), ! (the not operator) | Right to left |
| 3 | * (multiplication), / (division), % (modulus) | Left to right |
| 4 | + (addition), - (subtraction) | Left to right |
| 5 | < (less than), <= (less than or equal to), > (greater than), >= (greater than or equal to) | Left to right |
| 6 | == (equal to), != (not equal to) | Left to right |
| 7 | && (logical and) | Left to right |
| 8 | || (logical or) | Left to right |
| 9 | ? : (the conditional operator) | Right to left |
| 10 | =, *=, /=, %=, +=, -= (assignment operators) | Right to left |
| 11 | , (the comma operator) | Left to right |