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 does obj stand for?

633


Define a constructor - what it is and how it might be called (2 methods)?

604


Write about the stack unwinding?

626


What is capacity in vector in c++?

549


Can I create my own functions in c++?

603






What are the sizes and ranges of the basic c++ data types?

588


What are the classes in c++?

641


How would you differentiate between a pre and post increment operators while overloading?

652


What is c++ flowchart?

678


C is to C++ as 1 is to a) What the heck b) 2 c) 10

641


What is searching?

656


what is COPY CONSTRUCTOR and what is it used for?

621


Why are pointers used?

580


Explain method of creating object in C++ ?

597


Why do we need constructors in c++?

618