Dec 18, 2008

What is the difference between these two statements

What is the difference between these two statements
void (*p) (void *a[],int n)
void *(*p[]) (void *a, int n)

in first statement, we are declaring a function pointer p, which takes 2 arguments (an array 'a' of void pointers and an integer) and returns nothing.
in second statement, we are declaring an array 'p' of function pointers, with 2 arguments ( a void pointer and an integer) and returns a void pointer.

No comments:

Post a Comment