Home » C Programming » Decision Making » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    int main()
    {
    int n = 1;
    if (n)
    printf("Everything is okay.");
    printf("Everything is not okay.\n");
    else
    printf("I have fever\n");
    }
    1. Everything is okay.
    2. Everything is not okay.
    3. I have fever.
    4. Compilation Error
    5. Runtime Error
Correct Option: D

Compilation Error

 #include <stdio.h>
int main()
{
int n = 1;
if (n)
printf("Everything is okay.");
printf("Everything is not okay.\n");
else
printf("I have fever.\n");
}



Your comments will be displayed only after manual approval.