passing array in a function 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) );