How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

We have a three ways for declaring techniques : 

   1. char *(*(*a[P])())();
   2. Build the declaration up in stages, using typedefs:
      typedef char *pc; /* pointer to char */
      typedef pc fpc(); /* return function pointer to char */
      typedef fpc *pfpc; /* pointer to above */
      typedef pfpc fpfpc(); /* returning function */
      typedef fpfpc *pfpfpc; /* pointer to*/
      pfpfpc a[P]; /* array of*/
   3. Use the cdecl program, which turns English into C and vice versa:
      cdecl> declare a as array of pointer to function returning pointer to function returning pointer to char
      char *(*(*x[])())() 

By:Umang
Date:2002-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher