← 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?
- A.The keyword abstract
- B.Having at least one pure virtual function (= 0)
- C.Having a private constructor
- 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 →