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 is double in c++?
Describe the syntax of single inheritance in C++?
Is c++ a programming language?
What is the function of I/O library in C++ ?
What are multiple inheritances (virtual inheritance)?
How can you create a virtual copy constructor?
What is istream and ostream in c++?
How many types of comments are there in c++?
Which is better turbo c++ or dev c++?
What does ctime() do?
What is c++ and its features?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
What methods can be overridden in java?
what Is DCS ? what i will get benefit when i did?
What is the basic concept of c++?