what is virtual function?
Answer Posted / pooja pimplapure
Virtual, as the name implies, is something that exists in
effect but not in reality. The concept of virtual function
is the same as a function, but it does not really exist
although it appears in needed places in a program. The
object-oriented programming language C++ implements the
concept of virtual function as a simple member function,
like all member functions of the class.
The functionality of virtual functions can be over-ridden
in its derived classes. The programmer must pay attention
not to confuse this concept with function overloading.
Function overloading is a different concept and will be
explained in later sections of this tutorial. Virtual
function is a mechanism to implement the concept of
polymorphism (the ability to give different meanings to one
function).
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is difference between oop and pop?
What are main features of oop?
What is the difference between static polymorphism and dynamic polymorphism?
How is polymorphism achieved?
How does polymorphism work?
What is difference between abstraction and encapsulation?
Explain the concepts involved in Object Oriented programming.
Is html an oop?
What are the benefits of oop?
How can you overcome the diamond problem in inheritance?
#include
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is overloading in oop?
What is object and example?
What is polymorphism and why is it important?