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
Why is encapsulation used?
What is encapsulation example?
What are the types of abstraction?
What is the use of oops?
How oops is better than procedural?
What is the benefit of oop?
What is difference between data abstraction and encapsulation?
Can static class have constructor?
What are objects in oop?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What are the advantages of polymorphism?
What is coupling in oops?
What is oops concept with example?
What is an interface in oop?
Can bst contain duplicates?