Main(){ if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); }}

A) none of the above
B) compile error
C) OK I am gone
D) OK I am done

Showing Answers 1 - 8 of 8 Answers

rik

  • Aug 25th, 2011
 

compilation error...because the if condition is always true and the else condition becomes unreachable...

  Was this answer useful?  Yes

aniketzr

  • Aug 31st, 2011
 

The ans. is (d)
-> as per the explanation given by kgupta11oct

and @rik: there will be case of else condition not reachable but it will just give a warning and not error

  Was this answer useful?  Yes

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