🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Inheritance and Virtual Functions: all 10 questions

Quiz: Inheritance and Virtual Functions · Question 1 of 10

What makes a C++ class abstract?

What makes a C++ class abstract?

  1. A.The keyword abstract
  2. B.Having at least one pure virtual function (= 0)
  3. C.Having a private constructor
  4. D.Having no members
Answer & explanation

Correct answer: Having at least one pure virtual function (= 0)

A class with a pure virtual function can't be instantiated.

Can you get the rest right without peeking?

Take the timed Quiz: Inheritance and Virtual Functions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →