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

Quiz: Multiple Inheritance and the Diamond Problem · Question 10 of 10

What is a cost of virtual inheritance?

What is a cost of virtual inheritance?

  1. A.Virtual functions stop working
  2. B.The class cannot have constructors
  3. C.Objects carry extra hidden information to find the shared base, making access slightly slower
  4. D.The base class members become private
Answer & explanation

Correct answer: Objects carry extra hidden information to find the shared base, making access slightly slower

Use it only where a real diamond exists.

Can you get the rest right without peeking?

Take the timed Quiz: Multiple Inheritance and the Diamond Problem quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →