Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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();
}
}

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();
}
}
a) Run time error
b) hi
c) Infinite hi
d) hi hi

Answer: d

Join The Discussion