What will be the output of the following C code?
#include <stdio.h>
void main()
{
static int x = 3;
x++;
if (x <= 5)
{
printf("hi");
main();
}
}
#include <stdio.h>
void main()
{
static int x = 3;
x++;
if (x <= 5)
{
printf("hi");
main();
}
}A. Run time error
B. hi
C. Infinite hi
D. hi hi
Answer: Option D

Join The Discussion