Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    printf("Hello Interview Mania! %d \n", num);
    return 0;
    }
    1. Hello Interview Mania! num
    2. Compilation Error
    3. Hello Interview Mania!
    4. Hello Interview Mania! followed by a garbage value
    5. None of these
Correct Option: B

It results in an error since num is used without declaring the variable num.



Your comments will be displayed only after manual approval.