Somewhat confusing, you can declare a function to accept a function as a parameter (although this does not make sense), and the effect should make the parameter a function pointer. This is similar to how you can declare a function parameter that looks like an array, but is actually a pointer.
A function argument can be a function name, with or without & , to explicitly accept its address. If you omit & , that is, an implicit conversion between lines. Again, this is similar to passing (a pointer to) an array, where an implicit conversion between strings and pointers means that you only need to write the name of the array, not &array[0] .
This rule does not apply when declaring variables; int goo(int); (with or without extra parentheses around goo ) declares a function, not a pointer, and you cannot assign functions.
source share