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

Explain can the sizeof operator be used to tell the size of an array passed to a function?

582


Tell us something about keyword 'auto'.

654


Are comments included during the compilation stage and placed in the EXE file as well?

660


How to compare array with pointer in c?

610


Explain a pre-processor and its advantages.

610






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

603


Describe the order of precedence with regards to operators in C.

626


How can I manipulate individual bits?

594


write a program to concatenation the string using switch case?

1547


c program to compute AREA under integral

1795


what is bit rate & baud rate? plz give wave forms

1505


Write a program which returns the first non repetitive character in the string?

588


Explain how can I remove the trailing spaces from a string?

616


Explain the use of keyword 'register' with respect to variables.

582


What is the use of clrscr?

581