What is the output of the following C code? #include <stdio.h> #include…

ISRO Scientist/Engineer SC 2011Modified — slightly modified from the official paper; see the solution

What is the output of the following C code?

#include <stdio.h>
#include <conio.h>

void main()
{
    int index;
    for (index = 1; index <= 5; index++)
    {
        printf("%d", index);
        if (index == 3)
            continue;
    }
}
  1. A.

    1245

  2. B.

    12345

  3. C.

    12245

  4. D.

    12354

Attempted by 1994 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…