InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is correct for multiple inheritance?(a) class student{public:int marks;}s;class stream{int total;}; class topper:public student, public stream{};(b) class student{int marks;}; class stream{ }; class topper: public student{ };(c) class student{int marks;}; class stream:public student{ };(d) class student{ }; class stream{ }; class topper{ };The question was asked in final exam.My question is taken from Inheritance topic in chapter Inheritance & its Types of Object Oriented Programming |
|
Answer» The correct option is (a) CLASS student{public:int marks;}s;class stream{int total;}; class topper:public student, public stream{}; |
|