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

Can I learn c++ as my first language?

1096


Can a function take variable length arguments, if yes, how?

1000


Is c++ pass by reference or value?

1048


You want to link a c++ program to c functions. How would you do it?

979


What is virtual function? Explain with an example

1087


How to access a variable of the structure?

1069


Can c++ be faster than c?

1016


What operator is used to access a struct through a pointer a) >> b) -> c) *

1089


What are the uses of pointers?

1058


What is setiosflags c++?

958


What do you mean by late binding?

1116


How can you quickly find the number of elements stored in a dynamic array?

1043


What is the use of vtable?

1135


What type of question are asked in GE code writing test based on c++ data structures and pointers?

3973


What is ios :: in in c++?

1061