← Quiz: Inheritance and Virtual Functions: all 10 questions
Quiz: Inheritance and Virtual Functions · Question 9 of 10
Can you create an object of an abstract class?
Can you create an object of an abstract class?
- A.Yes, but its pure virtual functions do nothing
- B.No, but you can have pointers and references to it that refer to derived objects
- C.Yes, if you use new
- D.Only inside the derived class
Answer & explanation
Correct answer: No, but you can have pointers and references to it that refer to derived objects
An abstract class has at least one pure virtual function with no implementation, so it cannot 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 →