adspace


Write A Program to find the ambiguities in Multiple
Inheritance? How are they
resolved.(Virtual Functions)

Answer Posted / Ranjit Kumar

In C++, when a class derives from more than one base class that have conflicting member functions, it is known as multiple inheritance ambiguity. This ambiguity can be resolved using virtual functions. A pure virtual function (declared with = 0) in the base class must be overridden by derived classes. When an object of the derived class is accessed polymorphically (through a base class pointer or reference), the correct version of the overridden function is called due to the presence of virtual keyword.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please send ford technologies placement paper 2 my mail id

2173


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

2277