Reputation: 1170
Statement:
"array of N pointers to functions, returning pointers to functions and returning pointer to integer"
Can anyone help me with understanding the function prototype for above statement ?
Given answer- int *(*(*a[N])()) ();
Please can anyone explain me how we arrive at the above answer ?
Upvotes: 1
Views: 94
Reputation: 286
*a[N]
is the array of N pointers, calling it x
*(x)()
returning function pointer, calling it y
int *(y) ()
is function pointer returning integer
Upvotes: 1
Reputation: 49220
int *(*(*a[500])()) ();
Translates to:
declare a as array 500 of pointer to function returning pointer to function returning pointer to int
Note:Next time, use this site to understand complex pointer statements http://cdecl.org/
Upvotes: 1