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 exactly is polymorphism?
What is oops concept with example?
What is destructor example?
What are the benefits of oop?
Where You Can Use Interface in your Project
What is oops and its features?
What are the features of oop?
Can we create object of interface?
What are constructors in oop?
What are the 3 pillars of oop?
What is the advantage of oop over procedural language?
How to call a non virtual function in the derived class by using base class pointer
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
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 is a class and object?