Why the copy constructor is having a (&) variable as parameter?
the work of the copy constructor is to create a new object of the same class and copy the value of the data members from the calling object into this new object data members. When we pass some variables as input parameters the copy constructor gets called to create local copies of the objects. If the & is ignored then the Copy Constructor will keep calling itself and will go into an endless loop. To avoid this endless loop situation we have to pass the parameter into the copy constructor as a reference.