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
Get step-by-step solutions from verified subject matter experts
