Explain Associativity of operators wit6h example.
Question :
Explain Associativity of operators wit6h example.
Associativity means the order in which the two operators with the same precedence should be applied in an expression. It is usually associated from left to right . This means that operators with the same precedence are evaluated from left to right manner. For example, 2+3-4 is evaluated as (2+3)-4.
Some operators like assignment operators have right to left associativity. i.e., a=b=c is treated as a= (b=c).