The code below
i>0?j=9:i=7;
Is giving an error:
lvalue required as left operand of assignment
Can you explain this why I am getting this error?
when, i>0?j=9:(i=7);
is working correctly
Imho: basically your problem is that is C the termary operator has higher priority than "=" (in c++ the prioriy is equal, so it works as expected) and that is the reason you need the parenthesis.