Since all the operators we have studied in this unit can be used together in an expression, C uses a certain hierarchy to solve such kind of mixed expressions. The hierarchy and associatively of the operators discussed so far is summarized in Table 6. The operators written in the same line have the same priority. The higher precedence operators are written first
| 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 |
| ?: | Right to left |
| = += -= *= /= %= &&= ||= | Right to left |
| , | Left to right |


