Quiz Yourself on Reading Complex Pointer Declarations
Test your understanding of the material presented in this chapter.
We'll cover the following...
We'll cover the following...
Complex pointer declarations
1.
Select the answer that best describes the following declaration:
double(*fptr(char, long(*)(char, float*)))(char);
A.
The fptr function takes two arguments: a char and a pointer to a function that takes two arguments, char and float*, returning long. The fptr function then returns a pointer to a function that takes a char and returns double.
B.
The fptr function takes arguments: a char, a pointer to long, a char, and a pointer to float then it returns a double.
C.
The declaration is wrong.
D.
The fptr is a function that takes a char argument and returns a pointer to a function that takes a char argument and a function taking as arguments a char and a float and returning a pointer to long returning a double.
1 / 7
...