A

Admin • 833K Points
Coach

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

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

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.