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

Answer Posted / kar4you

Answer: 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[])())()

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there constructors in c?

588


What is the difference between fread buffer() and fwrite buffer()?

667


Write a program to swap two numbers without using third variable?

812


How do I use void main?

629


What is c language in simple words?

588






Explain how can I avoid the abort, retry, fail messages?

585


What is the argument of a function in c?

569


Can you subtract pointers from each other? Why would you?

556


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1888


Differentiate Source Codes from Object Codes

813


What is %lu in c?

677


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2602


hi send me sample aptitude papers of cts?

1650


What are the primitive data types in c?

568


How can I do graphics in c?

586