A

Admin • 833K Points
Coach

Q. Which of the following is the correct way to define a function pointer in C++?

  • (A) int (*ptr)(int, int);
  • (B) int *ptr(int, int);
  • (C) int ptr(int, int);
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 44
  • Filed under category C++
  • Hashtags:

Explanation by: Admin

The correct way to define a function pointer is 'int (*ptr)(int, int);'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.