R

Ram Sharma • 193.86K 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: 36
  • Filed under category C++

Explanation by: Ram Sharma
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.


Question analytics