A

Admin • 802.91K Points
Coach

Q. Which of the following is the correct syntax for defining a pure virtual function in C++?

  • (A) virtual void show() = 0;
  • (B) void show() = 0;
  • (C) virtual void show();
  • (D) abstract void show();
  • Correct Answer - Option(A)
  • Views: 4
  • Filed under category C++
  • Hashtags:

Explanation by: Admin
A pure virtual function is declared using 'virtual' followed by '= 0'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.