p is a pointer to a function that takes the value void and returns an integer.
f1 is a function that takes a void value and returns an integer.
f2 is a function that takes a void argument and returns a pointer to an integer.
Now, according to the definitions, you can see that f1 can be assigned to p , but f2 can't. To assign f2 to p , the declaration of p must be int *(*p)();
source share