 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement nested structure in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search bar. My channel will be available there. You can watch various programming related videos there. You can also download my programming app, Takamis, which is available on Google Play. Now, you can see I have implemented a code in front of you. So first statement is header file inclusion that is STDI cottage. Then I have declared a structure whose name is student. The student structure is having two members, roll number and marks. First one is of integer type and second one is of float type. Now I have to declare some date variables so that I can read date of birth, date of admission and date of examination. So instead of writing various day, month and year variables, I have implemented nested structure inside student structure. So this date structure will be known as nested structure and it is containing three variables dm and y. After its complete declaration, I have created three variables of date structure that is dob, do, admit, admission and date of examination. So these three variables are now a member of student structure. So student structure is now having five variables, roll number, marks, date of birth, date of admission and date of examination. So roll number and marks is of primitive data types that are int and float and date of birth, date of admission and date of examination belongs to date structure that is user defined data type. So this way I have implemented the declaration of student structure. Now inside main function, you can see I have declared a variable that is s which is which which belongs to student structure. Now I have to read all the information from user through this s variable and through this s variable I can print all the received information again on output screen. So here you can see this printf scanner will read roll number from user and that will be stored inside s dot roll number. Then marks will be stored inside s dot marks. Then you have to notice this printf scanner which is reading date of birth. So printf will print enter date of birth, then scanner will read three entities day month and year. So for that purpose I have written s dot dob dot d. So s is variable of student structure. It is having a member date of birth which is which belongs to date structure and date structure is containing a member d. So that's why s dot dob dot d, then s dot dob dot m and s dot dob dot y. So day month and year will be stored this way and accordingly date of admission will be stored and then date of examination will be stored. So this way through these printf scanner statements roll number, marks, date of birth, admission and date of examination will be stored in s variable collectively. Now to print all these information on output screen I have used these printf statements. So first student details will be displayed, then roll number through s dot roll number, then marks through s dot marks, then date of birth will be displayed in this format that is percenty hyphen, percenty hyphen, percenty. So day, then hyphen, then month, then hyphen, then year and to print s dot dob dot d is used here. So s is student structure variable. It is having dob variable of date class, sorry date structure and d is the member of date structure. So this way day month year will be displayed, then date of admission will be displayed and then date of examination will be displayed. So you can see all the variables are managed with the help of s variable that belongs to student structure. So this is the complete implementation of the program. Now I can execute this code so that output can be generated. So it is asking for roll number. I have entered one. Now it is asking for marks. I am entering 100. Now date of birth in dmy format. So day, then month and then year. So this way I have entered my date of birth. Now date of admission and date of examination. So this way I have entered three different dates. Now you can see the output. It is showing roll number, marks, date of birth, date of admission and date of examination. So friends, I hope you have understood how I have managed all the entities with the help of a single variable and I have declared a structure into another structure. So this program is demonstrating you how you can implement the concept of nested structure in C programming. I hope you have understood of whatever I have explained in this video. If you want to watch more programming related videos, you can type my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos there. Don't forget to subscribe my channel. Thank you for watching this video.