Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    static int num;
    void main()
    {
    int num;
    printf("num is %d", num);
    }
    1. Runtime Error
    2. num is 0
    3. Compilation Error
    4. Garbage value
    5. None of these
Correct Option: B

num is 0



Your comments will be displayed only after manual approval.