Copy constructors are called in these situations:
i.)when compiler generates a temporary object
ii.)when a function returns an object of that class by value
iii.)when the object of that class is passed by value as an argument to a function
iv.)when you construct an object based on another object of the same class