🎙 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 9 of 10

Can you create an object of an abstract class?

Can you create an object of an abstract class?

  1. A.Yes, but its pure virtual functions do nothing
  2. B.No, but you can have pointers and references to it that refer to derived objects
  3. C.Yes, if you use new
  4. 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 →