 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement default parameterized and copy constructor in a single class in C++. Before starting, you can note my information. You can connect with me by following these details. You can download my app Takimus, which is based on programming languages, which is available on Google Play. Now coming onto the topic, here I am going to demonstrate you the implementation of default parameterized and copy constructors in C++. I have included a header file IO stream for that purpose. Then STD namespace is used, which is predefined, name of classes complex, its attributes real and imaginary are declared here. Then in public section, first I have defined default constructor. So default constructor initializes specific values provided by the programmer. And those values will be assigned into the attributes which are available in private section of the class. So here R and IR private attributes, R will be receiving 10 and I will be receiving 20. If we create more than one objects and we don't pass arguments while creating those objects, then default constructor will assign same values to all those objects. Second constructor is parameterized constructor. It receives values passed by the object. Here A and B are formal parameters which will be receiving two values. A will be assigned into R and B will be assigned into I. Here specific values are not available. So whenever you are creating more than one objects and you are passing some values, then different different values will be assigned into different objects with the help of this parameterized constructor. So this makes a difference between default and parameterized. Default constructor initializes objects with same values, whereas you can assign different values to different objects using parameterized constructor. Now third type of constructor is copy constructor. It is used if you want to copy values of an object into another at the time of their creation. Then you can use copy constructor. Here argument you can see argument name is C and its data type is complex. So the argument will be an object of the class and C dot R and C dot I is assigned into R and I. So in case of copy constructor, the argument which we have to pass will be an object of the class. Then print function is defined which will be printing real and imaginary values on console. After that you can see main function is implemented. Here you can see C1 object is created and I am not passing any argument to it. So it will call default constructor. The default values that are 10 and 20 will be assigned into R and I. Then I have created C2 and I am passing C1 inside it. So C1 is an argument which is an object also. So values of C1 will be assigned into C2 and with C2 dot print values of C2 will be printed and it will be printing the values of C1. So it will be calling copy constructor and third C3 object is created. Here 50 and 100 is passed. So it will be calling parameterize constructor. So C3 dot print will print 50 and 100. If we create another object C4 and two different values we want to pass then it can be done with the help of parameterize constructor. Now I am executing it. You can see the output C1 object is printing 10 and 20. C2 is also printing 10 and 20 because of copy constructor and C3 object is printing 50 and 100. Now if you want to create one more object C4 and suppose I am passing 100 and 200 inside it. Now by calling print function I can print its values. So again it will be calling parameterize constructor. You can see the output. Last object is printing 100 and 200. This is because of parameterize constructor. So friends I hope you have understood the uses of default parameterize and copy constructor in a class. Default initializes specific values to all the objects whereas parameterize constructor initializes different values provided by the object and copy constructor is used to copy values of an object into another object. So you can implement all three constructors in a single class. If you want to use a particular constructor then you can also implement that only constructor. But if you require all three constructors then you can implement them together. If you want to watch more programming related videos you can subscribe my YouTube channel. Thank you for watching this video.