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
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is the use of header files?
What is the difference between volatile and const volatile?
What is graph in c?
What is volatile variable in c with example?
Explain output of printf("Hello World"-'A'+'B'); ?
Why is c still so popular?
What is the purpose of 'register' keyword in c language?
Can I initialize unions?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Explain how do you print only part of a string?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
How do you print only part of a string?
Why n++ execute faster than n+1 ?