Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int k = 0, L = 0;
    for (k = 0; k < 3; k++)
    {
    for (L = 0; L < 5; L++)
    {
    if (k > 1)
    break;
    }
    printf("Interview Mania\n");
    }
    }
    1. "Interview Mania" is printed 1 times
    2. "Interview Mania" is printed 2 times
    3. "Interview Mania" is printed 3 times
    4. "Interview Mania" is printed 4 times
    5. "Interview Mania" is printed 5 times
Correct Option: C

"Interview Mania" is printed 3 times



Your comments will be displayed only after manual approval.