-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
void funA();
void funB()
{
funA();
}
funB();
}
void FunA()
{
printf("Interview Mania");
}
-
- Compilation Error
- Interview Mania
- Garbage value
- Depends on the compiler
- None of these
Correct Option: D
Even though the answer is 2, this code will compile fine only with gcc. GNU C supports nesting of functions in C as a language extension whereas standard C compiler doesn’t.