Is it possible to pass a function pointer as an argument to a function in C?
If so, how would I declare and define a function which takes a function pointer as an argument?
Definitely.
void f(void (*a)()) {
a();
}
void test() {
printf("hello world\n");
}
int main() {
f(&test);
return 0;
}