Multiple choice

Which of the following is not calling the copy constructor of class given below?

Class Test { public: Test(int i ); };

  1. Test Obj2(Obj1);

  2. Test Obj2 = Obj1;

  3. Test Obj1,Obj2;Obj2 = Obj1;

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Here default assignment operator is called as we have not overloaded assignment operator. So, this is the correct option as copy constructor will not be called here.