Do you mean how do I read this?
You discarded some useful context from the original answer, so let's repair that:
void print();
void exitme();
int main() {
void (*p[2])()={print,exitme};
so now it's obvious that print
and exitme
refer to functions.
Specifically, they both return void and take no arguments, so they share the function pointer type
void (*)()
(that is, a function pointer of that type can point to either print
or exitme
). For example,
void (*print_or_exit)() = (rand() % 2) ? print : exitme;
print_or_exit(); // who knows what it will do!
Now, an array of two of these function pointers looks like:
void (*ptr[2])()
and can be initialized as:
void (*ptr[2])() = { print, exitme };
so now we can rewrite our stupid example as:
void (*print_or_exit)() = ptr[rand() % 2];