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 are default parameters? How are they evaluated in c++ function?
how to connect with oracle 9i with server in socket program in c/c++
Can we delete this pointer in c++?
Which coding certification is best?
Where is atoi defined?
How to give an alternate name to a namespace?
What size is allocated to the union variable?
explain the reference variable in c++?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
Do the parentheses after the type name make a difference with new?
When must you use a pointer rather than a reference?
What are mutator methods in c++?
What is an overflow error?
Is c++ primer good for beginners?
What do you mean by overhead in c++?