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


Please Help Members By Posting Answers For Below Questions

What is double in c++?

561


Describe the syntax of single inheritance in C++?

647


Is c++ a programming language?

594


What is the function of I/O library in C++ ?

666


What are multiple inheritances (virtual inheritance)?

585






How can you create a virtual copy constructor?

585


What is istream and ostream in c++?

599


How many types of comments are there in c++?

577


Which is better turbo c++ or dev c++?

564


What does ctime() do?

616


What is c++ and its features?

578


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

656


What methods can be overridden in java?

671


what Is DCS ? what i will get benefit when i did?

1836


What is the basic concept of c++?

577