← 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?
- A.Virtual functions stop working
- B.The class cannot have constructors
- C.Objects carry extra hidden information to find the shared base, making access slightly slower
- 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 →