English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Based on the following class declaration answer the question? The data member can be accessed from the function displaydata().

Advertisements
Advertisements

Question

Based on the following class declaration answer the question?

class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected vehicle {
int diesel_petrol;
protected:
    int load;
public:
void read_data(float,float)
void write_data(); };
class bus: private heavy_vehicle {
char Ticket[20];
public:
void fetch_data(char);
void display_data(); };

The data member can be accessed from the function displaydata().

Options

  • passenger

  • load

  • Ticket

  • All of these

MCQ
Advertisements

Solution

All of these

shaalaa.com
  Is there an error in this question or solution?
Chapter 16: Inheritance - Evaluation - Section - A [Page 273]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 16 Inheritance
Evaluation - Section - A | Q 9. 9.2. | Page 273
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×