Operator precedence: Each operator in C has a precedence associated with it.
Precedence in Arithmetic Operators
- The precedence is used to determine how an expression involving more than one operator is evaluated.
- The operators of higher precedence are evaluated first.
An arithmetic expression without parenthesis will be evaluated from left to right using the rules of precedence of operators. There are two distinct priority levels of arithmetic operators in C.
- High priority * / %
- Low priority + -