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




Answers were Sorted based on User's Feedback



How do I declare an array of N pointers to functions returning pointers to functions returning poi..

Answer / 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 ?    5 Yes 1 No

How do I declare an array of N pointers to functions returning pointers to functions returning poi..

Answer / ashutosh tiwari

char *(*(*a[N])())();

Is This Answer Correct ?    1 Yes 2 No

Post New Answer




More C Interview Questions

without using arithmatic operator convert an intger variable x into x+1

3 Answers  


Given an array A[n+m] of n+m numbers, where A[1] ... A[n] is sorted and A[n+1] ... A[n+m] is sorted. Design a linear time algorithm to obtain A[1...n+m] sorted using only O(1) extra space. Time Complexity of your algorithm should be O(n) and Space Complexity O(1).

0 Answers  


why little endian and big endian came?y they using differently? y they not used commonly ?wt is application of little and big ?

1 Answers  


how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?

0 Answers  


what is a function method?give example?

0 Answers  






what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


implement OR gate without using any bitwise operator.

1 Answers   Wipro, Alcatel,


what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason

3 Answers  


what is the importance of spanning tree?

0 Answers  


what is the output of below code int x=8,y; x>>=2; y=x; what is y value. NOTE:EXPLANATION IS COMPALSARY with binary bits

2 Answers   Wipro,


write a program to display numbers from 1 to 10 and 10 to 1?

2 Answers  


which one is highest Priority in c? a)=,b)+,c)++,d)==

4 Answers  






Categories