UrbanPro
true

Take Class 10 Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

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

Sujoy Das
10/03/2019 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];

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

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

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...

Class X Science Sa - 2.
Q1. What is the importance of variation? Q2. Differentiate between asexual and sexual mode of reproduction. Q3. Why is DNA copying an essential part of the process of reproduction? Q4. Draw male or...
L

Lalit Gautam

0 0
0

Type Of Chemical Reaction
Types of Chemical Reactions Combination Reaction When two or more substances combine to form a single product, the reaction is known as a combination reaction. For example: In the laboratory, iron...

Explain the functions of the following parts of the eye : (a) cornea (b) iris (c) pupil (d) ciliary muscles (e) eye-lens(f) retina (g) o
a. Cornea: The cornea is the outermost layer of the eye and is primarily responsible for focusing the light that comes into our eyes. The cornea provides 66% of the optic power that the overall eye has....

HALOGENS
HALOGENS:- 17TH Groups elements are called Halogens because halogen means salt producing, these elements produce the salts when they combine with metals.F, Cl, Br, I etc. belong to this group.PROPERTIES...
X

Looking for Class 10 Tuition Classes?

The best tutors for Class 10 Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take Class 10 Tuition with the Best Tutors

The best Tutors for Class 10 Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. 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