What is Evaluation, Precedence and Association in C language?



Expressions are evaluated by the ‘C’ compiler based on precedence and associativity rules.

If an expression contains different priority operators, then the precedence rules are considered.

Here, 10*2 is evaluated first since ‘*’ has more priority than ‘- ‘and ‘=’

If an expression contains same priority, then associativity rules are considered i.e. left right (or right to left).


Advertisements