What will be the output of the following C code?

What will be the output of the following C code mcq and its answer is provided on this page.

What will be the output of following C code?

#include <stdio.h>
int main()
{
    void foo();
    printf("1 ");
    foo();
}

void foo()
{
    printf("2 ");
}
a 1 2
b 1 2 1 2
c Compile time error
d Depends on compiler
Answer: a
Explanation : None


Comments