A
aladdin
Hi, all
I found that the following code compiles successfully and works well. Does
that mean nested function definition is supported in C just like that in
Pascal?
My compiler is gcc (GCC) 3.3.1 (mingw special 20030804-1).
#include <stdio.h>
#include <stdlib.h>
int foo()
{
int foo1()
{
printf("in foo1\n");
}
printf("in foo\n");
foo1();
}
int main()
{
foo();
system("pause");
}
aladdin
I found that the following code compiles successfully and works well. Does
that mean nested function definition is supported in C just like that in
Pascal?
My compiler is gcc (GCC) 3.3.1 (mingw special 20030804-1).
#include <stdio.h>
#include <stdlib.h>
int foo()
{
int foo1()
{
printf("in foo1\n");
}
printf("in foo\n");
foo1();
}
int main()
{
foo();
system("pause");
}
aladdin