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
Explain what is the use of a semicolon (;) at the end of every program statement?
What is 02d in c?
Why can’t we compare structures?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Explain the use of bit fieild.
Difference between malloc() and calloc() function?
write a program to display all prime numbers
What is the use of parallelize in spark?
What are the different categories of functions in c?
What are pointers? What are stacks and queues?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
How can you tell whether a program was compiled using c versus c++?
Explain high-order and low-order bytes.
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
what will be the output for the following main() { printf("hi" "hello"); }