New ! Computer Science MCQ Practise Tests



Classes and objects Model Question Paper

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 02:00:00 Hrs
Total Marks : 50
    6 x 1 = 6
  1. The variables declared inside the class are known as

    (a)

    data

    (b)

    inline

    (c)

    method

    (d)

    attributes

  2. Which of the following access specifier protects data from inadvertent modifications?

    (a)

    Private

    (b)

    Protected

    (c)

    Public

    (d)

    Global

  3. What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?

    (a)

    Compile-time error

    (b)

    Domain error

    (c)

    Runtime error

    (d)

    Runtime exception

  4. Which of the following create a temporary instance?

    (a)

    Implicit call to the constructor

    (b)

    Explicit call to constructor

    (c)

    Implicit call to the destructor

    (d)

    Explicit call to the destructor

  5. How many features commonly present in OOP language?

    (a)

    3

    (b)

    4

    (c)

    5

    (d)

    many

  6. Which of the following is used to create user defined datatype?

    (a)

    properties

    (b)

    operations

    (c)

    behaviour

    (d)

    class

  7. 7 x 2 = 14
  8. What are called members?

  9. What is the difference between the class and object in terms of oop?

  10. Write down the importance of destructor.

  11. Define class.

  12. What is access specifies?

  13. What is global class?

  14. Identity the error.
    class A
    {
    float X;
    void init( )
    {
    A a1;
    X 1.5 =1;
    }};
    void main ( )
    { A1.init( );}

  15. 5 x 3 = 15
  16. Rewrite the following program after removing the syntax errors if any and underline the errors:
    #include
    $include
    class mystud
    { int studid =1001;
    char name[20];
    public
    mystud( ) { }
    void register ( )
    {cin>>stdid; gets(name); }
    void display ( )
    {cout<<studid<<”: “<<name<<endl;}
    }
    int main( )
    { mystud MS;
    register.MS( );
    MS.display( );
    }

  17. What are advantages of declaring constructors and destructor under public accessability?

  18. What is copy constructor?

  19. What is constructor?

  20. Explain default constructor with an example.

  21. 3 x 5 = 15
  22. Explain nested class with example.

  23. Write the output of the following
    #include < iostream >
    #include < stdio.h >
    using namespace std;
    class P
    { public:
    P ( )
    { cout<< "\nConstructor of class P "; }
    ~ P ( )
    { cout<< "\nDestructor of class P "; }
    };
    class Q
    { public:
    Q( )
    { cout<< "\nConstructor of class Q "; }
    ~ Q( )
    { cout<< "\nDestructor of class Q "; }
    };
    class R
    { P obj1, obj2;
    Q obj3;
    public:
    R ( )
    { cout<< "\nConstructor of class R ";}
    ~ R ( )
    { cout<< "\nDestructor of class R ";}
    };
    int main ( )
    {
    Ro R;
    Q oq;
    P op;
    return 0;
    }

  24. Write a C++ program example of creating global and local object

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

Reviews & Comments about 11th Standard Computer Science - Classes and Objects Model Question Paper

Write your Comment