New ! Computer Science MCQ Practise Tests



11th Standard English Medium Computer Science Subject Classes and objects Creative 5 Mark Questions with Solution Part - II

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 25

    5 Marks

    5 x 5 = 25
  1. Write a C++ program example of creating global and local object

  2. Explain the scope resolution operator with an example.

  3. Explain how the objects can be passed in pass reference method.

  4. Write the output of the following program.
    #include < iostream >
    using namespcae std;
    class simple
    {
    private:
    int a,b;
    public:
    simple(int m, int n)
    {
    a=m;
    b=n;
    cout << "\nParameterized Constructor of classsimple" << endl;
    }
    void putdata( )
    {
    cout << "\nThe two integers are ..." << a <<"\t << b << endl;
    cout << "\nThe sum of the variables " << a << " + " << b << "=" << a+b;
    }
    };
    int main( )
    {
    simple s1(10,20),s2(30,45);//Created two objects with different values created
    cout << "\n\t\tObject 1\n";
    s 1.putdata( );
    cout << "\n\t\tObject 2\n";
    s2.putdata( );
    return 0;
    }

  5. What are the ways to create an object using parameterized constructor with an example?

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

Reviews & Comments about 11th Standard English Medium Computer Science Subject Classes and objects Creative 5 Mark Questions with Solution Part - II

Write your Comment