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 / deepa balamurugan

If the both Base and the Derived class having the same
function then the Base class funtion should be declared as
virtual function. Then the C++ determines which function to
be called at the runtime based on the type of the object
pointed to by the Base pointer rather than the type of the
pointer.
As soon as the compiler reads the keyword virtual ,it will
create the vtable contains the address of the virtual
function inside that class and as soon as vtable is
created ,vptr is initialized to the proper vtable.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ a good beginners programming language?

1077


What is conditions when using boolean operators?

1236


Explain the isa and hasa class relationships.

1038


Explain differences between new() and delete()?

1100


What is a constructor in c++ with example?

1135


How to demonstrate the use of a variable?

1124


What is the advantage of an external iterator.

1049


What is null and void pointer?

1062


What is ctime c++?

1127


Explain shallow copy?

1054


Explain what are single and multiple inheritances in c++?

1027


Does c++ have foreach?

1066


Is c++ a software?

1200


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

1055


Which software is used for c++ programming?

1084