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
What is a local variable?
How do I use turbo c++?
Is multimap sorted c++?
What is a singleton c++?
Why do we use double in c++?
Can union be self referenced?
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
Describe new operator?
What is basic if statement syntax?
How would you use the functions randomize() and random()?
What is c++ library?
When should we use container classes instead of arrays?
What is input operator in c++?
What is meant by the term name mangling in c++?
Explain operator overloading.