596 views

The expression $5-2-3*5 – 2$ will evaluate to $18$, if :

1. $‘ – ‘$ is left associative and $‘*‘$ has precedence over $‘ – ‘$
2. $‘ – ‘$ is  right  associative and $‘*‘$ has precedence over $‘ – ‘$
3. $‘ – ‘$ is  right  associative and $‘ – ‘$ has precedence over $‘*‘$
4. $‘ – ‘$ is  left  associative and $‘ – ‘$ has precedence over $‘*‘$

thx

https://gateoverflow.in/253202/explain

correct answer is C

Option A is correct.

### 1 comment

Need step by step solution to that.

.                                             Answer is c

1 vote