Vidyalelo
C Programming · Q138

Control Structures

Programming · C Programming · question 138

Q138

What will be the output of the following C code? #include int main() int i = 0, j = 0; for (i; i < 2; i++) for (j = 0; j < 3; j++) printf("1 "); break; printf("2 "); printf("after loop ");

A.
1
2
after loop
B.
1
after loop
C.
1
2
1
2
after loop
Answer
D.
1
1
2
after loop

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board