Explain the Copy Constructor.
A member function that initializes an object using another object of the same class is known as a copy constructor in C++. They can also be made private. A call to the copy constructor can happen in any of the following 4 scenarios when:
- The compiler generates a temporary object
- An object is constructed or based on some another object of the same class
- An object of the class is returned by value
- An object of the class is passed (i.e., to a function) by value as an argument
