 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use default constructor in single inheritance in C++. Before starting, you can note my information, you can follow my YouTube channel that is Sanjay Gupta Anderson Tech School, you can download my app Techimage that is available on Google Play. Now coming onto the topic, in this video, I am demonstrating you how you can use default constructor in single inheritance. So I have included a header file that is IO stream, then I have used the name space STD. After that, I have implemented two classes. First one is class A and second one is class B. Inside class A, I have defined a constructor that is default constructor which will display a message constructor of class A. I have just implemented default constructor and I have not implemented any other function. Then class B is implemented, which is inheriting class A. In its public part, constructor of B class is defined, which will display constructor of class B messes on console. So these two classes are defined in C++. A is known as base class and B is a derived class. In main function, you can see I have created an object of B class. So when I will be executing this code, both the constructor will be executed, but first derived class constructor will be called and then control will be transferred to base class constructor. Then base class constructor will execute and then derived class constructor will be executed. So you have to note that order of calling of constructor is derived to base class and order of execution of constructor is base to derived class. So whenever constructor is called, first derived class constructor is called and then base class constructor is called. But when we talk about execution, so first base class constructor is executed and then derived class constructor is executed. So output of this program will be constructor of class A and then constructor of class B. You can see it here. I am executing this code. You can see the output constructor of class A and constructor of class B. This message has been displayed on console. So it is the justification that always base class constructor execute first and then derived class constructor executes. So this is a simple demonstration where default constructor is implemented in single inheritance. We can implement default constructor with multiple multi-level and any other type of inheritance. And we can also implement parameterized constructor. I have demonstrated these examples in my further tutorials or videos. You can watch them in this playlist. I hope you have understood this concept. If you want to watch more programming related videos, you can follow my YouTube channel. You can download my app TechMS that is available on Google Play. Thank you for watching this video.