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
What is the use of setfill in c++?
If you don’t declare a return value, what type of return value is assumed?
What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)
What is the importance of mutable keyword?
What are c++ tokens?
Difference between declaration and definition of a variable.
What do you mean by “this” pointer?
Write a function to find the nth item from the end of a linked list in a single pass.
When do you call copy constructors?
Can you pass an array to a function in c++?
What is the best c++ compiler?
Why cstdlib is used in c++?
What is the use of data hiding?
What is the two main roles of operating system?
Define the process of handling in case of destructor failure?