#include #include int hello(int n); int goodbye(int n); /* An fp_t is a pointer to a function that has one int argument and that returns an int. For example, an fp_t could hold the address of the function hello or the function goodbye. */ typedef int (*fp_t)(int); void f(fp_t p); int main() { f(hello); f(goodbye); return EXIT_SUCCESS; } void f(fp_t p) { printf("%d\n", (*p)(10)); } int hello(int n) { printf("hello\n"); return 2 * n; } int goodbye(int n) { printf("goodbye\n"); return 3 * n; }