I want my function to create an array and allocate memory for n pointers to functions (for example, functions that have no parameters and return int) and to return a pointer to that array.
I tried doing:
void* f(int n){
return calloc(int (*arrayName[])(void),n);
}
But i'm getting a syntax error. I'm pretty new to c and i tried to dig for an hour how to solve this issue with no success. using the man page i figured calloc is the way to go but i might be wrong.