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

Why are interfaces (classes with only pure virtual functions) safe to combine with multiple inheritance?

Why are interfaces (classes with only pure virtual functions) safe to combine with multiple inheritance?

  1. A.They are faster than other classes
  2. B.They have no data, so nothing is duplicated and no diamond copies arise
  3. C.They cannot be inherited twice
  4. D.The compiler converts them to templates
Answer & explanation

Correct answer: They have no data, so nothing is duplicated and no diamond copies arise

The danger of multiple inheritance comes mainly from duplicated data in shared bases.

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 →