ISRO | ISRO CS 2017 – May | Question 60

What will be the output of the following C code?

filter_none

edit
close

play_arrow

link
brightness_4
code

#include <stdio.h>
int main()
{
int i;
for ( i=0; i<5; i++ )
{
   int i = 10;
   printf ( "%d ", i );
   i++;
}
return 0;
}

chevron_right


(A) 10 11 12 13 14
(B) 10 10 10 10 10
(C) 0 1 2 3 4
(D) Compilation error


Answer: (B)

Explanation:

Quiz of this Question

My Personal Notes arrow_drop_up

Recommended Posts:

    Article Tags :

    1


    Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.