Expressions on C related Questions and Answers


Question :   Which of the following is the correct usage of conditional operators used in C?
1. a>b ? c=30 : c=40;
2. a>b ? c=30;
3. max = a>b ? a>c?a:c:b>c?b:c
4. return (a>b)?(a:b)
Answer :   3 - max = a>b ? a>c?a:c:b>c?b:c  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter