Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
532 views
in Computer by (50.9k points)
closed by

Answer the questions (i) to (iv) based on the following: 

class indoor_sports 

int i_id; 

char i_name[20]; 

char i_coach[20]; 

protected:

int i_rank, i_fee; 

void get_ifee(); 

public: 

indoor_sports(); 

void iEntry(); 

void ishow();

}; 

class outdoor_sports

int o_id; 

char o_name[20]; 

char o_coach[20]: 

protected:

int orank, ofee; 

void get_ofee(); 

public: 

outdoor_sports(); 

void oEntry(); 

void oshow(): 

}; 

class sports: public indoor_sports, protected outdoor_sports 

char rules[20]; 

public:

sports(); 

void registration();

 void showdata(); 

};

(i) Name the type of inheritance illustrated in the above C++ code. 

(ii) Write the names of all the members, which are accessible from the objects belonging to class outdoor_sports. 

(iii) Write the names of all the member functions, which are accessible from the member function of class sports. 

(iv) What will be th

1 Answer

+1 vote
by (45.3k points)
selected by
 
Best answer

(i) Multiple inheritance 

(ii) Data members : None 

Member Functions : oEntry(), oshow() 

(iii) registration(), showdata(), oEntry(), oshow(), get_ofee(), iEntry(), ishow(), get_ifeeO. 

(iv) 46 bytes

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...