Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How the V-Table mechanism works?

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


Please Help Members By Posting Answers For Below Questions

What is singleton pattern in c++?

918


What are destructors?

939


Can the creation of operator** is allowed to perform the to-the-power-of operations?

947


What is guard code in c++?

1102


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

909


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1091


Is there a c++ certification?

987


Tell me what are static member functions?

1033


Where and why do I have to put the "template" and "typename" keywords?

976


What does new do in c++?

1019


What is c++ iterator?

1048


Distinguish between new and malloc and delete and free().

953


Please explain class & object in c++?

1043


Can a built-in function be recursive?

975


What is virtual table?

1047