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 polymorphism oop?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What polymorphism means?
Which method cannot be overridden?
What is polymorphism what are the different types of polymorphism?
What is the oops and benefits of oops programming?
Why do we use inheritance?
What is multilevel inheritance?
Can main method override?
Can we override main method?
What is the problem with multiple inheritance?
What language is oop?
What is constructor in oop?
Why do we use oop?
How do you achieve runtime polymorphism?