Predict the output of below C program:
(A) 5 1
(B) Prints “a = 5 b = 1” ten times.
(C) a = 5 b = 1
(D) The program will not produce any output
Explanation: The printf statement is outside the if block because of the semicolon operator after the if statement and thus it is also outside the for loop block. So, it is executed only once.
Quiz of this Question