C Programming MCQ

1:

Consider following program fragment

if (a > b)
printf("a> b") ;
else
printf ("else part") ;
print f("a< = b") a <= b


will be printed if

A.

a>b

B.

a < b

C.

a=b

D.

All of these

 

Answer : D

Explanation :

The else clause has no brackets i.e., {and}. This means the else clause is made up only one statement. So, printf ("a < = b"); will be executed anyway, i.e. if a>b a< = b. Hence the answer

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.