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
Can an interface inherit a class?
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?
Is oop better than procedural?
How do you achieve polymorphism?
What is encapsulation oop?
What is abstraction encapsulation?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What are main features of oop?
What is encapsulation example?
write knight tour problem which is present in datastructure
Which type does string inherit from?
Why we use classes in oop?
How is class defined?
What is object and class in oops?
What is encapsulation with example?