what is the use of function pointers in c code example
Example: c function pointer in argument
void f(void (*a)()) {
a();
}
void test() {
printf("hello world\n");
}
int main() {
f(&test);
return 0;
}
void f(void (*a)()) {
a();
}
void test() {
printf("hello world\n");
}
int main() {
f(&test);
return 0;
}