New ! Computer Science MCQ Practise Tests



Inheritance Model Question Paper

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 02:00:00 Hrs
Total Marks : 50
    6 x 1 = 6
  1. Which of the following is the process of creating new classes from an existing class

    (a)

    Polymorphism

    (b)

    Inheritance

    (c)

    Encapsulation

    (d)

    super class

  2. Which of the following derives a class student from the base class school

    (a)

    school: student

    (b)

    class student: public school

    (c)

    student: public school

    (d)

    class school: public student

  3. Which amongst the following is executed in the order of inheritance?

    (a)

    Destructor

    (b)

    Member function

    (c)

    Constructor

    (d)

    Object

  4. Which of the following feature of oops acquires the properties of the existing class?

    (a)

    polymorphism

    (b)

    Encapsulation

    (c)

    Inheritance

    (d)

    Data abstraction

  5. A class that is used to derive another class is called________.

    (a)

    sub class

    (b)

    super class

    (c)

    nested class

    (d)

    derived class

  6. A class that inherits from a super class is called________.

    (a)

    sub class

    (b)

    nested class

    (c)

    super class

    (d)

    base class

  7. 7 x 2 = 14
  8. What is inheritance?

  9. What is a base class?

  10. Why derived class is called power packed class?

  11. What is the difference between public and private visibility mode?

  12. List the types of inheritance.

  13. Write the syntax of creating derived class.

  14. Write the syntax for derived and base class.

  15. 5 x 3 = 15
  16. What are the points to be noted while deriving a new class?

  17. What is the difference between polymorphism and inheritance though are used for reusability of code?

  18. What do you mean by overriding?

  19. Why do you need for inheritance?

  20. Explain the uses of private, protected and public inheritance.

  21. 3 x 5 = 15
  22. Explain the different types of inheritance.

  23. Consider the following c++ code and answer the questions
    class Personal
    {
    int Class,Rno;
    char Section;
    protected:
    char Name[20];
    public:
    personal();
    void pentry();
    voidPdisplay();
    };
    class Marks:private Personal
    {
    float M{5};
    protected:
    char Grade[5];
    public:
    Marks();
    void M entry();
    void M display();
    };
    class Result:public Marks
    {
    float Total,Agg;
    public:
    char FinalGrade, Commence[20];
    Result();
    void R calculate();
    void R display();
    }:
    (i) Which type of Inheritance is shown in the program?

  24. Write the output of the following program
    #include< iostream >
    using namespace std;
    class A
    {
    protected:
    int x;
    public:
    void show()
    {
    cout<<"x = "<<x<<endl;}
    A()
    {
    cout<<endl<<" I am class A "<<endl;}
    ~A( )
    {
    cout<<endl<<" Bye ";} };
    };
    class B : public A
    {
    protected:
    int y;
    public:
    B(int x, int y)
    { x = x1;
    y = y1; }
    B( )
    {
    cout<<endl<<" I am class B "<<endl; }
    ~B( )
    {
    cout<<endl<<" Bye "; }
    void show( )
    {
    cout<<"x = "<<x<<endl;
    cout<<"y = "<<y<<endl; }
    };
    int main( )
    {
    A objA;
    B objB(30, 20);
    objB.show( );
    return 0;
    }

*****************************************

Reviews & Comments about 12th Standard Computer Science - Inheritance Model Question Paper

Write your Comment