thx

Dark Mode

596 views

1 vote

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

- $‘ – ‘$ is left associative and $‘*‘$ has precedence over $‘ – ‘$
- $‘ – ‘$ is right associative and $‘*‘$ has precedence over $‘ – ‘$
- $‘ – ‘$ is right associative and $‘ – ‘$ has precedence over $‘*‘$
- $‘ – ‘$ is left associative and $‘ – ‘$ has precedence over $‘*‘$

The question is wrong. The real expression is $5-2-3*5-2$.

https://compsciedu.com/C-Programming/Data-Types_Operators-and-Expressions-in-C/discussion/67864

0