#include
#include
int fun1()
{
printf(\"I am fun1.\");
return 0;
}
int fun2(int fun())
{
fun();
return 0;
}
int mai
These two function definitions are equivalent in C:
int fun2(int fun()) { ... }
and
int fun2(int (*fun)()) { ... }
In the first function the parameter is adjusted to a function pointer. See C Standard paragraph:
(C99, 6.7.5.3p8) "A declaration of a parameter as ‘‘function returning type’’ shall be adjusted to ‘‘pointer to function returning type’’, as in 6.3.2.1."