Find the best tutors and institutes for Class 10 Tuition

Find Best Class 10 Tuition

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

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

Sujoy Das
10 Mar 0 0

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

class indoor_sports


int i_id;

char i_name[20];

char i_coach[20];


int i_rank,i_fee;

void get_ifee();



void iEntry();

void ishow();


class outdoor_sports


int o_id;

char o_name[20];

char o_coach[20];


int orank,ofee;

void get_ofee();



void oEntry();

void oshow();


class sports:public indoor_sports,protected outdoor_sports


char rules[20];



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 the size of the object belonging to class indoor_sports?

0 Dislike
Follow 1

Please Enter a comment


Other Lessons for You

REFLECTION When the light rays incident on an opaque(non transferant) object it bounce back.This phenomenon of light is called reflection. LAWS OF REFLECTION;_ 1) The incident ray,reflected ray and...

JAL HI JEEVAN HAI( Until its PH is above 7)
We all have heard about this line " JAL HI JEEVAN HAI" but this is valid for humans until they are drinking water having pH 7 or above otherwise " JAL HI MAUT KA KARAN BAN JATA HAI". Let Me Explain In...

The Trend of Electron Affinity in Periodic Table
The electron affinity (Eea) of a molecule or an atom or is the amount of energy spent or released when an electron is added to a neutral atom or molecule in the gaseous state to form a negative...

Ramakrishna Dhooli | 24/12/2018

0 0

Trend of Ionisation Potential in Periodic Table
IONISATION POTENTIAL:- The ionisation potential is the amount of energy required to remove a valence electron from the isolated gaseous atom. Factors affecting the ionisation potential:- 1) Atomic size:-...

Ramakrishna Dhooli | 22/12/2018

0 0

Modern Periodic law and Periodic Table
Modern Periodic law:- The Modern Periodic law states that the properties of elements are periodic functions of their atomic number. # In Modern Periodic Table elements are arranged in increasing order...

Ramakrishna Dhooli | 21/12/2018

0 0

Find Best Class 10 Tuition ?

Find Now » is India's largest network of most trusted tutors and institutes. Over 25 lakh students rely on, to fulfill their learning requirements across 1,000+ categories. Using, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 6.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more