Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    void main()
    {
    static int n;
    if (n++ < 5)
    main();
    }
    1. 5
    2. Infinite calls to main
    3. Runtime Error
    4. Varies
    5. main is called twice
Correct Option: E

main is called twice



Your comments will be displayed only after manual approval.