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 >
int main()
{
void foo();
printf(“1 “);
foo();
}
void foo()
{
printf(“2 “);
}

What will be the output of the following C code?
#include < stdio.h >
int main()
{
void foo();
printf(“1 “);
foo();
}
void foo()
{
printf(“2 “);
}
a) 1 2
b) Compile time error
c) 1 2 1 2
d) Depends on the compiler

Answer: a

Join The Discussion