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
Is java a c++?
Can user-defined object be declared as static data member of another class?
What is an object in c++?
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
What is ios flag in c++?
what is data encapsulation in C++?
What are built-in functions? What is the syntax for the definition?
What is anonymous object in c++?
Why is c++ is better than c?
What is #include iostream h in c++?
When is the copy constructor called?
How do you save a c++ program?
What is the exit function in c++?
How would you use the functions sin(), pow(), sqrt()?
What are pointer-to-members in C++? Give their syntax.