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
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What is a constructor and how is it called?
What is stream and its types in c++?
What is abstract class in c++?
Which programming language is best?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What does flush do?
Why use of template is better than a base class?
What is purpose of new operator?
What is the insertion operator and what does it do?
What is the main function c++?
What is c++ virtual inheritance?
How can you differentiate between inheritance and implementation in c++?
Describe the setting up of my member functions to avoid overriding by the derived class?
What is const pointer and const reference?