What is Evaluation, Precedence and Association in C language?

CServer Side ProgrammingProgramming

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

Published on 20-Feb-2021 05:14:57