Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 0;
    for (fun(); k == 1; k = 2)
    printf("Executed in loop\n");
    printf("Executed After loop\n");
    }
    int fun()
    {
    return 1;
    }
    1. Infinite loop
    2. Compilation Error
    3. Executed in loop
    4. Executed After loop
    5. None of these
Correct Option: D

Executed After loop



Your comments will be displayed only after manual approval.