void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void.
What does this means in a very very very simple explanation
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Imagine you have a function – let’s call it
a()– that returns void.a()has an address in memory.Now imagine you have a function
pa()that returns a pointer toa(), i.e.pa()returns the address ofa().Now, you don’t have just one pair of functions like this but several:
b()returns void,pb()returns the address ofb()c()returns void,pc()returns the address ofc()and so on.
Now you want to store the addresses of
pa(),pb(),pc()etc in an array, but you don’t know how many of them there are yet, so you declare an array of unspecified size to hold all those.The type of that array, is an array of pointers to functions that return pointers to functions that return void.