what is virtual function?
Answer Posted / laxmikant
A virtual function is a function which is precedded by the
key word derived is declared in the base class.It is
normally used to achieve run time polymerphism.That means
we can override the base class function in the derived
class.We can invoke the virtual function through the base
class pointer depending upon the contents to which the base
class pointer points to.
Generally the implementation of virtual
class was found in inheritance where the base class
function is override in the derived class.
Is This Answer Correct ? | 23 Yes | 6 No |
Post New Answer View All Answers
What is the real time example of encapsulation?
Give two or more real cenario of virtual function and vertual object
What is a function in oop?
What is encapsulation and abstraction? How are they implemented in C++?
What is polymorphism and example?
What is polymorphism explain?
What is inheritance in oop?
What is difference between multiple inheritance and multilevel inheritance?
Which method cannot be overridden?
What is protected in oop?
What is the difference between inheritance and polymorphism?
What is the difference between abstraction and polymorphism?
How is polymorphism achieved?
Why do we use polymorphism in oops?
any one please tell me the purpose of operator overloading