what is virtual function?
Answer Posted / aarti ashar
A virtual function is a function member of a class,
declared using the "virtual" keyword. A pointer to a
derived class object may be assigned to a base class
pointer, and a virtual function called through the pointer.
If the function is virtual and occurs both in the base
class and in derived classes, then the right function will
be picked up based on what the base class pointer "really"
points at.
Is This Answer Correct ? | 25 Yes | 6 No |
Post New Answer View All Answers
Can static class have constructor?
What is encapsulation with real life example?
Which method cannot be overridden?
Why is abstraction used?
What is pointer in oop?
Can enum be null?
why reinterpret cast is considered dangerous?
class type to basic type conversion
What is the real time example of encapsulation?
What is methods in oop?
Explain the advantages of inheritance.
Can we define a class within the interface?
Why polymorphism is used in oops?
What is encapsulation oop?
#include