How Virtual functions call up is maintained?

Answers were Sorted based on User's Feedback



How Virtual functions call up is maintained?..

Answer / ranjeet garodia

it is not look up table.
instead it is vtable.
every object has the vptr which locate the vtable in which
there is entries for the virtual functions.
so when calling the function it ucall the respective
function through vptr.

Is This Answer Correct ?    9 Yes 1 No

How Virtual functions call up is maintained?..

Answer / guest

By using Look up tables that were added by the compile to
every class image.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C++ General Interview Questions

Define what is constructor?

0 Answers  


What does ios :: app do in c++?

0 Answers  


What is insertion sorting?

0 Answers  


What is purpose of abstract class?

0 Answers  


How to tokenize a string in c++?

0 Answers  






What are the two shift operators and what are their functions?

0 Answers  


When can you tell that a memory leak will occur?

1 Answers  


What is a c++ map?

0 Answers  


Why is it called c++?

0 Answers  


What are the extraction and insertion operators in c++?

0 Answers  


class Foo { public: Foo(int i) { } }; class Bar : virtual Foo { public: Bar() { } }; Bar b; Referring to the above code, when the object 'b' is defined, a compiler error will occur. What action fixes the compiler error? a) Adding a virtual destructor to the class Bar b) Adding a constructor to Bar which takes an int parameter c) Adding "Foo()" to the Bar constructor d) Adding a copy constructor to the class Foo e) Adding "Foo(0)" to the Bar::Bar initializer list

2 Answers   Quark,


Why c++ is the best language?

0 Answers  


Categories