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


Please Help Members By Posting Answers For Below Questions

What is meant by the term name mangling in c++?

608


What is the difference between a pointer and a link in c ++?

658


What is the type of 'this' pointer? When does it get created?

628


Explain selection sorting?

715


What is the full form of india?

668






Explain the problem with overriding functions

682


What is the difference between prefix and postfix versions of operator++()?

694


Which is not a valid keyword a) public b) protected c) guarded

855


Can we define a constructor as virtual in c++?

689


What is virtual table?

719


Is c++ vector dynamic?

646


What is enum class in c++?

792


Explain the difference between static and dynamic binding of functions?

652


Explain what you mean by a pointer.

736


What are the advantages of c++ over c?

695