Copy Constructor is usually invoked by passing reference to the old object of a class to a newly created object of the same class. Compiler by default provide a copy constructor to a class even if you didnt provide one. When the Copy Constructor is invoked either by calling copy constructor during declaration or using an assignment operator, the constructor will get the reference and then it simply assigns it to the new object using the assignment operator.So Copy Constructor is implemented by overloading the assignment operator.
Why program runs into an infinite loop , if copy constructor is invoked by value ?
If we didnt pass the old object by reference and if we pass by value, in the copy constructor it will be assigned to the new object by an assignment operator and the compiler will inturn call the copy constructor again and then assignment operator and so on in an infinite loop.