The correct statement for a function that takes a pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to an integer is

Asked In: BPSC TRE 1.0

Options

  • A. int **fun(float **, char **)
  • B. int *fun(float *, char *)
  • C. int **fun(float *, char **)
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. int **fun(float *, char **)

Detailed Explanation

Correct Answer: Option C

Explanation:
float * is a pointer to float. char ** is a pointer to a pointer to char. The return type int ** means a pointer to a pointer to int. Therefore, the correct declaration is int **fun(float *, char **).