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
What is the difference between encapsulation and polymorphism?
c++ program to swap the objects of two different classes
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
How do you achieve runtime polymorphism?
Why is there no multiple inheritance?
What is a class and object?
How to improve object oriented design skills?
Whats is abstraction in oops?
What is inheritance write a program to show use of inheritance?
What is destructor in oop?
What is and I oop mean?
Can we create object of interface?
What is pure oop?
What is overloading in oops?
What does sksksk mean in text slang?