A

Admin • 833K Points
Coach

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

  • (A) virtual void myFunction() = 0;
  • (B) void virtual myFunction() = 0;
  • (C) Both A and B
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category C++
  • Hashtags:

Explanation by: Admin

The correct way to define a pure virtual function is 'virtual void myFunction() = 0;'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.