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

Compilation Error



Your comments will be displayed only after manual approval.