what’s the difference between copy constructor and assignment operator?
Copy constructor will be called when you are creating an object and initializing it with the help of another in a single expression .But on the other hand assignment operator will be called when you are initializing a object by another object not creating it.
The answer should be, that the copy costructor is called at initializing the object, while the assignment operator used to assign one object by another.