What is virtual inheritance in C++?

a) C++ technique to enhance multiple inheritance
b) C++ technique to ensure that a private member of the base class can be accessed somehow
c) C++ technique to avoid multiple inheritances of classes
d) C++ technique to avoid multiple copies of the base class into children/derived class

1 thought on “ What is virtual inheritance in C++?”

  1. d
    Explanation: Virtual inheritance is a C++ technique with which it ensures that a derived class contains only one copy of the base class’s variables. Refer Wikipedia for more info.

Leave a Comment