what is virtual function?
Answer Posted / vindhyachal kumar gupta
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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain virtual inheritance?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
Which language is pure oop?
What does no cap mean?
What is destructor give example?
Explain the concepts involved in Object Oriented programming.
What is class in oop with example?
What is coupling in oops?
What is polymorphism explain?
What is the real time example of encapsulation?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
Can we create object of abstract class?
How do you achieve polymorphism?
Can a varargs method be overloaded?
What are the benefits of polymorphism?