What will be the output of the following C code?
#include <stdio.h>
int main()
{
void foo();
printf("1 ");
foo();
}
void foo()
{
printf("2 ");
}
#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: Option A

Join The Discussion