Home » C Programming » Decision Making » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    void main()
    {
    int p = 15;
    if (true);
    printf("Hey... Hellow...");
    }
    1. Hey..
    2. Hellow...
    3. 15
    4. true
    5. Compilation Error
Correct Option: E

Compilation Error

main.c: In function ‘main’:
main.c:5:13: error: ‘true’ undeclared (first use in this function)
if (true);
^~~~
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in



Your comments will be displayed only after manual approval.