...
/Quiz Yourself on Reading Complex Pointer Declarations
Quiz Yourself on Reading Complex Pointer Declarations
Test your understanding of the material presented in this chapter.
We'll cover the following...
Complex pointer declarations
Select the answer that best describes the following declaration:
double(*fptr(char, long(*)(char, float*)))(char);
The fptr
function takes two arguments: a char
and a pointer to a function that take two arguments, char
and float*
, it then returns long
. Then, the fptr
function returns double
.
The fptr
function takes arguments: a char
, a pointer to long
, a char
, and a pointer to float
then it returns a double
.
The declaration is wrong.
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
.