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
Describe linked list using C++ with an example.
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
Who was the creator of c++?
How can you link a c++ program to c functions?
Which software is best for programming?
What is the importance of mutable keyword?
What is pointer in c++ with example?
What is one dimensional array in c++?
Explain shallow copy?
What are friend functions in C++?
Define 'std'.
Is dev c++ free?
What is switch case in c++ syntax?
what is data abstraction in C++?
what is Member Functions in Classes?