 Hello friends! I am Sanjay Gupta. I welcome you on my channel. You can watch various programming related videos on my channel. Here, you can find more than 800 videos. You can search these videos by a keyword programming by Sanjay Gupta. In this video, I am going to demonstrate you how to pass arguments into functions in C programming. For demonstration purpose, I am going to use the example of swapping of two variables. So whenever you want to implement functions in C programming, you have to take care of three things. First one is declaration. Second one is function call. And third one is function definition. So first I am going to write function declaration. So function declaration tells three things. First is return type which is void here. Second is name of function which is swap here. And third one is number of arguments and as well as type of arguments. So this function will be passing two arguments of integer type. So these types and quantities can be of anything. So this is declaration. After this declaration, I am going to define main function. Inside main function, I am declaring two variables A and B which will receive inputs from user. This printer will display the message enter two numbers to receive values from user. I am writing scanf. So input will be stored inside A and B. After these inputs, I am going to call swap function. So inside swap function, I am passing two arguments A and B. This statement is known as calling of function or you can say function call. So this is the second part of function after completion of main function definition. I am going to write definition of swap which is third part of function. This third part is known as definition of function. Inside this function definition, I am declaring a temporary variable R. Now I am writing the logic of swapping which is the common logic. This logic is swapping values of two variables with the help of third variable. And actually values are available in A and B. These are passed into P and Q and P and Q are swapped with the help of R. So after swapping, I am going to display the values on output screen with the help of this printf statement. So this way I have passed values of A and B into P and Q. So at line number 9, this is the function call. And from line number 11 to 18, you can see it is the function definition. So this way I have divided a particular logic into a separate function which is not written in main. So whenever you want to swap values, you can call this function into main or any other function. So this way we can implement functions in C programming and we can pass arguments. Now I am going to execute this program so that you can check whether it is working properly or not. So you can see I have passed two arguments or you can say I have provided two values 10 and 20. So 10 is first value and 20 is second value. And in output you can see value 1 is 20 and value 2 is 10. So it means values are swapped properly and the program is working fine. So this way I hope you have understood how we can pass arguments into functions in C programming. Here you can see at line number 3 void is written. So this void is representing return type here. So in my another videos you can find out what is the meaning of return type and how we can return values to functions. So don't forget to watch those videos to understand more about functions. I hope you have understood whatever I have explained in this video. If you want to watch more programming related videos, you can follow me on YouTube. You can search my YouTube channel through my name. Don't forget to subscribe my YouTube channel. Thank you for watching this video.