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
write knight tour problem which is present in datastructure
What is the difference between abstraction and polymorphism?
What is variable example?
Can we define a class within the interface?
What is difference between abstraction and encapsulation?
How do you explain polymorphism?
Why polymorphism is used in oops?
what are the different types of qualifier in java?
What is encapsulation example?
What is overriding vs overloading?
What is interface in oop?
What does no cap mean?
What is polymorphism explain?
What does and I oop and sksksk mean?
Can a destructor be called directly?