What will be the output of the following C code?
#include <stdio.h>
void main()
{
static int x;
if (x++ < 2)
main();
}
#include <stdio.h>
void main()
{
static int x;
if (x++ < 2)
main();
}A. Infinite calls to main
B. Run time error
C. Varies
D. main is called twice
Answer: Option D

Join The Discussion