Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived

Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived
object,. calling of that virtual method will result in which method being called?

Questions by lakshmi5783

Showing Answers 1 - 3 of 3 Answers

rimi.mnnit

  • May 30th, 2008
 

Base class method ll b called.bcoz
when a function is made virtual,C++ determines which function to use at run time based on the type of the object pointed to by the base pointer,rather than type of pointer.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions