Solution
Operator precedence determines the order in which operations are performed in an expression. Certain operators have higher precedence and are evaluated before others.
For example, in :
- Exponentiation is done first:
- Then multiplication and division: and
- Then addition and subtraction:
If all operators were evaluated left to right with equal precedence, the result would be different. Parentheses '()' have the highest precedence and can be used to control the order.