what is virtual function?

Answer Posted / p.kumarasamy,be(cse)

C++ virtual function is a member function of a class, whose
functionality can be over-ridden in its derived classes. The
whole function body can be replaced with a new set of
implementation in the derived class. The concept of c++
virtual functions is different from C++ Function overloading.
C++ Virtual Function - Properties:

C++ virtual function is,

* A member function of a class
* Declared with virtual keyword
* Usually has a different functionality in the derived class
* A function call is resolved at run-time

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What makes a language oop?

593


program for insertion ,deletion,sorting in double link list

2276


What is the point of polymorphism?

584


What is abstraction in oop?

631


What is encapsulation in simple terms?

535






what is graphics

2009


write a C++ program for booking using constructor and destructor.

2042


What is the difference between encapsulation and polymorphism?

592


What is abstraction and encapsulation?

569


Is react oop?

607


What is encapsulation example?

545


Why do we use oop?

603


What is polymorphism and its types?

592


What is polymorphism explain?

685


class type to basic type conversion

1833