 Hello friends, I am Sanjay Gupta. I welcome you on my YouTube channel. You can watch various programming related videos here. It contains more than 800 videos. You can search those videos with the help of the keyword programming by Sanjay Gupta. In this video, I am going to demonstrate you how you can pass 1D array into function in C programming. For demonstration purpose, I am taking an example which will perform some of elements of 1D array and this 1D array will be passed into a function. First of all, I am going to include a header file that is stdi.h. Now I am going to declare a function. This function's return type is int, name is sum and it will receive an argument that will be of integer type array. So this is function declaration. Now I am going to define main function which will receive elements of array from user. This printf will be displaying enter elements message on output theme. Now to receive values from user, I am going to implement this for loop. This loop will receive 10 elements from user and all the elements will be stored inside array A at different indexes. Now I am going to call function sum. In this function call, I am passing array A and the result will be received in S variable. So with the help of printf, I can print the output on output screen. So this is the definition of main function. Now I am going to define definition of sum function. So this block is function definition. Inside this function, I am going to declare a variable s and another variable i. Now I am going to rotate a loop which will repeat 10 times and it will calculate sum of this array. And after completion of this loop, I am going to return the value of s which is containing sum of all the elements available in array. So this way I have implemented the complete code. So whenever you want to pass array into function, you can call the function like this with the statement which is available at line number 12. And from line number 15 to 22, I have defined the function definition. Here you can apply any particular logic which you want to implement. So this is the base or this is the basic way through which you can pass array into function. This example is related to 1D array only. In my another video, you can find out how we can pass 2D array into function. So now I am going to execute this code. It is asking for 10 elements. So I am entering 1, 10 times. You can see the output. It is displaying sum equals to 10. So I have entered 1, 10 times. That's why sum is 20. Sorry, sum is 10. If you want to enter another values, you can execute this program again and then those values sum will be displayed on output screen. So this way I have demonstrated you how you can pass 1D array into functions in C programming. I hope you have understood whatever I have explained in this video. If you want to watch more programming related videos, you can follow my YouTube channel. Thank you for watching this video.