107k views
4 votes
The prototype for a function is shown below. What is the second parameter?

void glop( int *w, int (*second)( char x, char y ) );



A. A structure consisting of two characters.



B. A pointer to an integer which is accessed as two characters.



C. A pointer to a function which takes two integers and returns a character.

D. A pointer to a structure containing two characters.

E. A pointer to a function which takes two characters and returns an integer.

User MaNKuR
by
4.9k points

1 Answer

1 vote

Answer:

E. A pointer to a function which takes two characters and returns an integer.

Step-by-step explanation:

Given function prototype:

void glop( int *w, int (*second)( char x, char y ) );

First parameter is a pointer to an integer.

Second parameter of the glop function: int (*second)( char x, char y );

Here second is a pointer to a function which takes two char data as inputs(char x and char y) and returns an integer datatype. So of the given options 'E' is the correct one.

User Richard N
by
5.1k points