C++ Programming - Objects and Classes - Discussion

Discussion Forum : Objects and Classes - General Questions (Q.No. 15)
15.
Which of the following statements about virtual base classes is correct?
It is used to provide multiple inheritance.
It is used to avoid multiple copies of base class in derived class.
It is used to allow multiple copies of base class in a derived class.
It allows private members of the base class to be inherited in the derived class.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
4 comments Page 1 of 1.

Ashutosh said:   7 years ago
Yes, we can access the base class from a derived class that is why there is no use of creating an object of the base class.

AKAK said:   1 decade ago
The question is unclear. It should be changed to:

Which of the following statements about virtual inheritance is correct?

Latha said:   1 decade ago
What do you mean by virtual base class and what is the use of virtual keyword?

Pooja said:   1 decade ago
Because creating a base class object is of no use.

Ex: class manager is derived from class employee.

And creating an instance of employee is waste and add no meaning.

Post your comments here:

Your comments will be displayed after verification.