Answer Posted / ramesh
V-table is specific to class. No matter how many objects
are created for this class, only one virtual table exists.
Each virtual function in the class will have a pointer in
Vtable.
Whenever a code like Base *b = new Derived; is encountered,
during compile time the search will happen in Base class.
Its only during run time the actual objects are invoked and
the fucntion present in derived class will be called.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is singleton pattern in c++?
What are destructors?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What is guard code in c++?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
Is there a c++ certification?
Tell me what are static member functions?
Where and why do I have to put the "template" and "typename" keywords?
What does new do in c++?
What is c++ iterator?
Distinguish between new and malloc and delete and free().
Please explain class & object in c++?
Can a built-in function be recursive?
What is virtual table?