here's a code
the output of the code isCode:#include <stdio.h> void f2(void); int main(void) { void f1(void); f1(); f2(); getch(); return 0; } void f2(void) { void f3(void); f1(); } void f1(void) { printf("BEN10"); f3(); } void f3(void) { printf("DESTINY"); }
BEN10DESTINYBEN10DESTINY
how can this be coz i'm declaring f1() inside main and calling it in f2(),same for f3().i'm declaring f3() inside f2() and calling it in f1().why is this code not giving any error?
in my opinion as f2() is declared outside of all functions thus it can be used anywhere but f1() and f3() are declared inside specific functions, so they can be used in that function only?
correct me if i'm wrong anywhere.
Thanks