 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate some of our 1D array by passing that array into function. Before starting, you can note my information. You can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech school. You can download my programming app Techimus, which is available on Google Play. Now coming onto the topic, to implement the solution, first I am including a header file stdio.h, then I am declaring a function. Return type of function is integer, name of function is sum, and here in this sum function I have to pass only one argument integer type array. Then inside main function, I am going to implement array variable i and s. Then I am printing a message on console using printf enter 10 elements. Then for loop i equals to 0, i less than 10 and i plus plus. With this for loop, I am going to repeat scanf statement so that 10 elements can be stored at different indexes of array. After reading operation, I have to call the function. So I am writing sum, sorry s equals to sum of 8. So this statement is function calling. So here sum function is called. I have passed array as input and the result of the function definition will be returned into this s variable. So now after this calling statement, I have to print the value of s on console, which is containing sum. So with this way, the result will be displayed on console and then return 0. So this is the complete definition of main. Now I am going to implement definition of sum function. So this block will be called as function definition. Inside this function, I am declaring two more variables i and s. Then I am implementing a for loop. And inside this for loop, I have to implement addition statements. That is s equals to s plus a of 5. And after completion of this loop, I have to return value of s. So this returned value will be received at function call inside this s variable. So this way I have implemented the complete code where main function is calling sum function. And then after main function, sum function is defined, which is returning calculated sum back to the main function. Now I am going to execute this code. Here you can see the message enter 10 elements. So I am entering 10 times 1. You can see the result sum equals to 10. So the program is working properly. It is showing the correct results. So this way I have implemented the program, which is reading 10 numbers using array from user. Then that array is passed into some function and some function is calculated sum of all the elements and that sum is returned back to the main function. And then main is printing that result on console with the help of printf. So this way I have calculated sum of array by passing array into function. I hope you have understood it well. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjay gupta underscore tech school. You can download my programming app techiness, which is available on Google Play. Thank you for watching this video.