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

class professor {};
class teacher : public virtual professor {};
class researcher : public virtual professor {};
class myprofessor : public teacher, public researcher {};

Referring to the sample code above, if an object of class
"myprofessor" were created, how many instances of professor
will it contain?
a) 0
b) 1
c) 2
d) 3
e) 4

Answer Posted / ahsanullah

becouse of virtual keyword it will create only one instances,
so ANS is: 1

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is exception handling? Does c++ support exception handling?

973


What is time_t c++?

1064


What is a tuple c++?

961


Define a nested class. Explain how it can be useful.

1040


How the programmer of a class should decide whether to declare member function or a friend function?

1064


How does atoi function work?

1099


Describe public access specifiers?

1038


What is polymorphism in c++? Explain with an example?

986


How did c++ get its name?

977


Explain rethrowing exceptions with an example?

979


What is the full form of india?

1030


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

912


Define 'std'.

1125


Why is c++ is better than c?

908


What is the difference between a baller and a reference in C++?

1050