What are Virtual Functions? How to implement virtual
functions in "C" ?
Answer Posted / rama
When we use the same function name in both the base and the
derived classes, the function in base class is declared as virtual...we must access virtual function through the use of a pointer declared as a pointer to the base class..
In other words, virtual function is defined in the base class,it need not be necessarily redefined in the derived class. In such cases,the respective calls will invoke the base class function.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is c++ an oop?
What does #define mean in c++?
What can I use instead of namespace std?
Can we overload operator in c++?
What is rvalue?
What are the advantages of using typedef in a program?
What is a container class?
How to declare a pointer to an array of integers?
What is constructor and destructor in c++?
How does c++ sort work?
Write a program using display() function which takes two arguments.
Which one between if-else and switch is more efficient?
What do you understand by pure virtual function? Write about its use?
What is a forward referencing and when should it be used?
Why c++ does not have finally?