 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can pass structure into function 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 on my channel. Now I am going to demonstrate you solution of this problem. First time including header file that is stdio.h. Now I am declaring a structure whose name is student. It will be having three members. First is roll number that is of integer type, then name character array and then marks that is of float type. Now I am going to declare a function whose name is displayed. Its return type is void and it will receive an argument of type struct student. So this statement will be known as function declaration. After this function declaration, I am going to define main function. Inside main function, I have to declare structure variable. So struct student will be known as data type and s is a variable of this structure. Now I have to receive values from user. So first I am typing enter roll number inside printf. This message will be displayed on output screen. To receive values from user scanf is written and then m% as.roll number. So this way roll number will be received from user then enter sorry then printf which will display enter name. Before reading name, I have to call fflush function and I am passing stdn inside it. Now I am calling gattas as.name. This fflush function will clear the buffer memory so that I can read character input after integer successfully. And lastly I am going to display the message enter marks to read marks from user scanf%f m% as.marks. So this way I have received all the information from user in s variable. Now I can pass this s variable into a function whose name is displayed. So this statement is known as function call and then return 0. So through this function call, I have passed the values which are available inside s variable. So this s variable belongs to structure which contains different type of elements. So now after completion of main function, I can define definition of display function. So this block will be known as function definition. So from calling values which are available inside s variable are passed and that is received through this s variable which is available in display function definition. Now with the help of this s variable, I can print the student information output screen. This way through these printfs, I am going to display values on output screen. So you can see I have implemented the complete code in front of you. So this way this is the complete code. Here I have passed structure variable into function. Now I am going to execute this code. So I am entering roll number 101. I am entering name Sanjay. I am entering marks 100. So you can see the output student details. Roll number equals to 101. Name equals to Sanjay and marks equals to 100. So this way the program is printing the received information from user through a function. So I have passed structure variable into a function in this program. So I hope you have understood how we can pass structure variable into a function. If you want to watch more programming related videos, you can search my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos there. Thank you for watching this video.