...

/

Precedence and Associativity

Precedence and Associativity

In this lesson, we will discuss the precedence and associativity of arithmetic operators.

Precedence

In case there is more than one operator in an expression, precedence determines the order in which the operators should be evaluated. The operator with higher precedence will be evaluated first in an expression. For example, multiplication * has higher precedence than addition +. Therefore, we ...