What would the output of c program?

What would be output of the following c program?

#include <stdlib.h>
#include <stdio.h>
enum {false, true};
int main()
int i = 1;
printf(“%d\n”, i);
if (i < 15)
} while (false);

return 0;

Asked on January 25, 2020 in program.

Output: 1


The do wile loop checks condition after each iteration.

So after continue statement, control transfers to the statement while(false).

Since the condition is false ‘i’ is printed only once.


on January 25, 2020.
Add Comment
1 Answer(s)

Output: 1

Answered on February 18, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.