Point out the error, if any, in the following program main() { int a=10,b; a>= 5 ? b=100 : b=200; printf("n%d",b); }

lvalue required in function main(). The second assignment should be written in parenthesis as follows:

a>= 5 ? b=100 : (b=200);


This question is related to Sonata Interview

Showing Answers 1 - 3 of 3 Answers

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions