#include
#include
int fun1()
{
printf(\"I am fun1.\");
return 0;
}
int fun2(int fun())
{
fun();
return 0;
}
int mai
Looking to it in a lower level (and in a x86-based architecture):
int fun2(int fun())
int fun()'s address is pushed into the stack and passed to fun2() function.
int fun2(int (*fun)())
int fun()'s pointer address is pushed into the stack and passed to fun2() function.
The result is the same, except that with second one, you pass the fun()'s address by reference, and in the first one you pass it by value.