Question: class Test{ int x; int y; public: Test(int h){ x=h; y=0; cout <

class Test{

    int x;

    int y;

public:

    Test(int h){

        x=h;

        y=0;

        cout<<"Constructor for Obj:"<

    Test(int h, int g){

        x=h;

        y=g;

        cout<<"Constructor for Obj:"<

    Test (){

        y=x=0;

         cout<<"Constructor for Obj:"<

    ~Test(){

           cout<<"Object :"<

       }

};

What is the output if:

int main() {

    Test *t1, *t2= new Test;

    return 0;

}//end of main

Step by Step Solution

3.45 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!