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 / alliance group
answer is 1......b option
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is meant by the term name mangling in c++?
What is the difference between a pointer and a link in c ++?
What is the type of 'this' pointer? When does it get created?
Explain selection sorting?
What is the full form of india?
Explain the problem with overriding functions
What is the difference between prefix and postfix versions of operator++()?
Which is not a valid keyword a) public b) protected c) guarded
Can we define a constructor as virtual in c++?
What is virtual table?
Is c++ vector dynamic?
What is enum class in c++?
Explain the difference between static and dynamic binding of functions?
Explain what you mean by a pointer.
What are the advantages of c++ over c?