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
Answers were Sorted based on User's Feedback
Answer / ahsanullah
becouse of virtual keyword it will create only one instances,
so ANS is: 1
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / 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 |
Write some differences between an external iterator and an internal iterator?
Explain about profiling?
What is the use of volatile keyword in c++? Give an example.
what is VOID?
Can a program run without main function?
How will you call C functions from C ++ and vice-versa?
0 Answers Agilent, Tavant Technologies, Thomson Reuters, Verifone,
Why is it necessary to use a reference in the argument to the copy constructor?
What are the types of container classes?
Floating point representation and output seems to be compiler dependent?
difference between the c++ and c languages
Explain the difference between using macro and inline functions?
what is meaning of isa and hsa