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).

Updated on: 2021-02-20T05:17:24+05:30

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements