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 / d.sakthi

ans is 1 option b
reason:as three classes are derived from base class single instance is enough

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the parameter to a template and the parameter to a function?

1172


what is a class? Explain with an example.

1192


What are virtual functions in c++?

1235


Write a program to add three numbers in C++ utilizing classes.

1185


what are the types of Member Functions?

1177


What is an adaptor class or wrapper class in c++?

1329


What's c++ used for?

1159


What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

1089


How to tokenize a string in c++?

1112


What are special characters c++?

1086


What do the header files usually contains?

1119


Tell me can a pure virtual function have an implementation?

1104


What is the need of a destructor?

1203


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

1086


What do you mean by overhead in c++?

1142