Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 0;
    do {
    k++;
    printf("Executed In while loop\n");
    } while (k < 5);
    }
    1. Depends on the compiler
    2. Compilation Error
    3. Executed In while loop
      Executed In while loop
      Executed In while loop
    4. Executed In while loop
      Executed In while loop
      Executed In while loop
      Executed In while loop
    5. Executed In while loop
      Executed In while loop
      Executed In while loop
      Executed In while loop
      Executed In while loop
Correct Option: E

Executed In while loop
Executed In while loop
Executed In while loop
Executed In while loop
Executed In while loop



Your comments will be displayed only after manual approval.