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

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

Answer: b

Join The Discussion