The output of the following loop is: for(int i=0; i<3; i++) printf("%d", i);
-
A
123
-
B
12
Correct answer
-
C
123
-
D
321
11 views
Explanation
The loop runs for i = 0, 1, 2 and prints each value. So the output is 012. The condition i
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ