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
How to declare a pointer to an array of integers?
Is c++ harder than java?
What is a storage class? Mention the storage classes in c++.
Is it possible to provide special behavior for one instance of a template but not for other instances?
Explain how functions are classified in C++ ?
Which coding certification is best?
What is diamond problem in c++?
What is ctime c++?
What is a far pointer? where we use it?
Why do we use structure in c++?
Distinguish between a # include and #define.
Can a constructor return a value?
Explain how a pointer to function can be declared in C++?
Is c++ a pure oop language?
Which function should be used to free the memory allocated by calloc()?