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...


What are the fields of vtable



What are the fields of vtable..

Answer / chandra

Vtable consists of function pointers pointing to the
virtual functions of their respective class.
Ex: Class A
{
public:
virtual void fun1();
virtual void fun2();
};
Class B: public A
{
public:
Virtual void fun2();
};

Now there will be 2 vtables created for the 2 classes. in
first vtable there will be 2 function pointers pointing to
fun1 and fun2.

one more vtable is created for the class B. in which this
vtable also consists of two function pointers because class
B is derived from class A. so all the functions are
derived . so in this vtable two function pointers are
present. one function pointer pointing to fun1 and one more
function pointer pointing to fun2 of derived class.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More OOPS Interview Questions

Can we call a base class method without creating instance?

6 Answers  


What are the main differences between procedure oriented languages and object oriented languages?

9 Answers   IBM, Infosys, Wipro,


what is a binary overloading

2 Answers  


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

2 Answers  


What is debug class?what is trace class? What differences are between them? With examples.

0 Answers  


In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?

2 Answers  


Describe the difference between a Thread and a Process?

11 Answers   Siebel Systems,


What is super in oop?

0 Answers  


What is encapsulation and abstraction? How are they implemented in C++?

0 Answers   Agilent, ZS Associates,


Write 7 differences between "Public" function and "Private" function?

2 Answers   IBM, Wipro,


What is meant by oops concept?

0 Answers  


How do you define social class?

0 Answers  


Categories