passing a function as a parameter c code example
Example 1: passing a function as an argument in c
void func ( void (*f)(int) ) {
for ( int ctr = 0 ; ctr < 5 ; ctr++ ) {
(*f)(ctr);
}
}
Example 2: passing a function as an argument in c
void func ( void (*f)(int) );