Query on c programming


Consider the following fragment
if a<b printf(“a<b”);
else printf(“elsepart”);
a<=b will be printed if:
d)all the above


D all of the above since the else block is not enclosed in brackets so else block only consists of 1 line i.e followed by else statement rest statement is not treated as else block statement


D all the above because no block is closed with brace so above all statements are true


Yes the answer is all of the above because the statement does not belong to the if block. So it will be executed without depending on the conditions present in if else block