what is virtual function?
Answer Posted / dev malhotra
virtual function is defined as virtual is a keyword which is used when one function or method is used in both base class and drived class at a time then, during compile time compiler cannot distinguish that which one compile or run first.
then to distinguish that problem the programmer use special keyword in base class or in derived class that is known as "VIRTUAL" keyword.
Due to this keyword the compiler always compiles the assigned virtual keyword method or function and this is called as virtual function.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is polymorphism explain its types?
What is encapsulation in oops?
What does and I oop mean?
What does oop mean in snapchat?
How to use CMutex, CSemaphore in VC++ MFC
c++ program to swap the objects of two different classes
What is abstraction in oop with example?
What is abstraction in oops with example?
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is inheritance in simple words?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
what are the ways in which a constructors can be called?
Why is destructor used?
officer say me - i am offered to a smoking , then what can you say
What is abstract class in oops?