A way to pass function as arguments.

Semantics, but a more apt name is pointer to function since it’s a pointer ( and hence that should be stated first ) and not a function. A function declaration for function name f

int f(int x);

Say I want to make it a pointer, I can do

int *f(int x); // which wrong as it's interpreted as
int* f(int x);

so you need to wrap it in ()

int (*f)(int x);

Note that the name is still f.

How to organize?

Use typedefs.

typedef int (*fptr)(int x);

Then you can use it as

typedef int (*fptr)(int);
 
int f(int x) {
    return x * 2;
}
 
int main() {
    fptr p = &f;
    // or
    fptr p = f;
}

Wait, what’s the difference between &f and f? The difference is just in explicitness. The function name refers to it’s address anyway so both are same. Same with arrays.

How does that typedef work? Isnt’ it typedef type_i_want name_i_want? No.