Which declaration defines a function that accepts a pointer to an integer and returns a pointer to a character?

Options

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

Correct Answer (Detailed Explanation is Below)

A. char *fun(int *)

Detailed Explanation

Correct Answer: Option A

Explanation:
In char *fun(int *), the return type char * means pointer to char, and the parameter int * means pointer to int. The return type appears before the function name, and the parameter types appear inside the parentheses.