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 are default parameters? How are they evaluated in c++ function?

767


how to connect with oracle 9i with server in socket program in c/c++

1958


Can we delete this pointer in c++?

789


Which coding certification is best?

647


Where is atoi defined?

657






How to give an alternate name to a namespace?

676


What size is allocated to the union variable?

683


explain the reference variable in c++?

683


Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.

698


Do the parentheses after the type name make a difference with new?

749


When must you use a pointer rather than a reference?

684


What are mutator methods in c++?

748


What is an overflow error?

717


Is c++ primer good for beginners?

676


What do you mean by overhead in c++?

681