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 / guest
Ans is value 1 i.e ans B
| Is This Answer Correct ? | 22 Yes | 0 No |
Post New Answer View All Answers
Is c++ an oop?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is setw manipulator in c++?
What is meant by the term name mangling in c++?
Are there any special rules about inlining?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
How do I start a c++ project?
What is difference between rand () and srand ()?
If you don’t declare a return value, what type of return value is assumed?
What does override mean in c++?
Why cstdlib is used in c++?
What happens if a pointer is deleted twice?
What new()is different from malloc()?
What is function prototyping?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?