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

How to tokenize a string in c++?

1045


why is iostream::eof inside a loop condition considered wrong?

1043


Write a program in C++ for Fibonacci series

1190


int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}

1252


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

4113


Differentiate between realloc() and free().

1025


Write bites in Turbo c++ Header ("Include") Files.

1253


Do you need a main function in c++?

1111


What are the 3 levels of programming languages?

1034


What is c++ redistributable?

1215


List different attributes in C++?

1078


Explain binary search.

980


Why is main an int?

982


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

1067


Explain one-definition rule (odr).

1107