506 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 $‘*‘$

https://gateoverflow.in/253202/explain

### Subscribe to GO Classes for GATE CSE 2022

Option A is correct.
by
3 8

### 1 comment

Need step by step solution to that.

1 vote
1
550 views
1 vote
2
1,652 views
3
2,198 views
1 vote