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. 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?
    (ii) Specify the visibility mode of base classes.
    (iii) Give the sequence of Constructor/Destructor Invocation when object of class author is created.
    (iv) Name the base class(/es) and derived class (/es).
    (v) Give number of bytes to be occupied by the object of the following class:
    (a) publisher
    (b) branch
    (c) author.
    (vi) Write the names of data members accessible from the object of class Result.
    (vii) Write the names of all member functions accessible from the object of class Result
    (viii) Write the names of all members accessible from member functionsof class Result

  24. Write the output of the following program
    #include< iostream >
    using namespace std;
    class A
    {
    protected:
    int x;
    public:
    void show()
    {
    cout<<"x = "< }
    A()
    {
    cout< }
    ~A( )
    {
    cout< }
    };
    class B : public A
    {
    {
    protected:
    int y;
    public:
    B(int x, int y)
    {
    this->x = x; //this -> is used to denote the objects datamember
    this->y = y; //this -> is used to denote the objects datamember
    }
    B( )
    {
    cout< }
    ~B( )
    {
    cout< }
    void show( )
    {
    cout<<"x = "< cout<<"y = "< }
    };
    int main( )
    {
    A objA;
    B objB(30, 20);
    objB.show( );
    return 0;
    }

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

TN 11th Standard Computer Science free Online practice tests

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

Write your Comment