 Hello friends! I am Sanjay Gupta. In this video, I am going to demonstrate you the difference between static object and dynamic objects in C++. Before starting, you can note my information. You can connect with me by following these details. You can download my app Takamis based on programming languages. It is available on Google Play. You can search my channel on YouTube. By typing my name on YouTube search, my channel will be available there. You can subscribe my channel if you want to follow my videos based on programming languages. Here, various programming languages related videos and playlists are available. You can improve your programming skills by watching these videos. Now, coming on to the topic. Here, static versus dynamic objects in C++ is demonstrated. First, I have included a header file iostream. Then, I have used a namespace std. Then, student class is declared. Inside student class, roll number and name, two attributes are declared. Then, public section is containing first function which is void read. It will display enter roll number message on console. Roll number will be entered inside roll number variable using cm. Then, cout will display enter name message on console. So, handle is used to terminate the line, its full form is and line. Then, name will be received inside name variable using cm. After read, print function is defined. It will display roll number on console and name on console. This roll number which is enclosed in double quotes, it is a caption. It will display as it is an R and O and name. These are variables. Handle is used for line termination. Inside main function, you can see I have created a static object i.e. student S. Then, enter student details message will be displayed on console. Then, read function is called using S object. Then, print function is called using S object. So, this S is a static object. Now, I am going to create dynamic object. So, first I am creating a pointer. Then, with the help of new, I am allocating dynamic memory. So, this is dynamic object. Now, with cout, I am typing a message. Enter student details. So, this message will be displayed on console. Now, I am using p then arrow and read. Remember that whenever you are calling a function of class using pointer, then you have to use this arrow operator. And if you are calling a function without any pointer or you can say using an object, then you can use dot operator. Then, cout, you have entered again p arrow print. So, you can see these statements are related to static object and these statements are related to dynamic object. Here, dynamic object is created using new operator. Now, after reading and printing operation, I am calling delete p. This is deallocation of dynamic object or you can say memory deallocation of dynamic object. So, with the help of new, you can create dynamic object. With the help of delete, you can delete the dynamically allocated memory. So, I am going to execute this code. It is asking roll number of first student. I am entering one and Sanjay. It is showing you have entered roll number one and name is Sanjay. Then, it is again asking for roll number and name. Second time, it is asking roll number and name through dynamic object. First details are printed with the help of static object and this time dynamic object is working. So, I am entering two and name because you can see it is displaying roll number two and name equals to because. So, friends, with this way, you can create static object as well as dynamic object. Static object is created at compilation time whereas dynamic object is created run time. So, benefit of dynamic object is that if you want to create multiple objects, then you can read how many objects you want to create by the user. But this is not possible with static object. So, this difference of dynamic and static object creation for multiple objects is demonstrated in my next tutorial. In this playlist, you can watch that video if you want to learn the difference between static and dynamic object creation for multiple objects. I hope you have understood the concept of creation of single static and dynamic object with this video. If you want to watch more programming related videos, you can search my channel by my name Sanjay Gupta on YouTube. Here, various programming related videos and playlists are available. Thank you for watching this video.