 Hello friends. I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print some of positive and negative elements or values which are available in array by passing array into a function. Before starting, you can note my information. You can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tax pool. You can download my programming app TechMS which is available on Google Play. Now I am going to implement the solution for this problem in C. So first I am including a header file stdio.h then I am declaring a function void some int and subscript. So this statement is function declaration. The return type of function is void name of function is some and it will receive an argument of integer array. Then main function inside main I am declaring an array and I variable then with the help of printf I will be displaying this message. Enter 10 elements then for loop I equals to 0 I less than 10 and I plus plus. So with the help of this for loop I am going to repeat scanf statement which will receive 10 elements from user and all the elements will be stored inside a array. Now after completion of this loop, I am calling some function and I am passing a array inside it. So this statement is function calling and then I am writing return 0. Now I have to define the function definition. So this block is function definition. Inside this function I have to implement the logic where I have to check whether the element which is available in array is positive or negative. Then I have to add positive numbers separately and negative numbers separately. So I am declaring three variables I s1 and s2 then I am implementing for loop inside this for loop. I am applying if condition where I am checking a of I greater than 0. So if a of I is greater than 0 then s1 equals to s1 plus a of I will be performed because number is positive. So all positive numbers will be added into s1. If this condition is false then I have to check a of I less than 0. So if array element is less than 0 then it is negative. So I am adding all negative numbers into s2. So this way I have implemented the loop which is checking positive and negative numbers separately. Positive numbers are added into s1 and negative numbers are added into s2. After completion of this loop I have to print the result on console. So for that purpose I am implementing printf which will display the masses positive sum equals to %d and negative sum equals to %d and then s1, s2. So with the help of this printf result of s1 and s2 will be displayed on console. So this is the complete implementation of the problem. First I have declared the function then main function is implemented which is reading array and calling the sum function. Then after completion of main sum function is defined which is checking positive and negative values and positive numbers are added into s1 and negative numbers are added into s2. Then after completion of loop s1 and s2 which is containing positive and negative sum will be displayed on console. Now I am executing this code. It is asking for 10 numbers. So I am entering 10 different values some positive and some negative numbers. So you can see 6 positive values are available 1, 1, 2, 2, 2, 4, 4, 3, 7, plus 1, 8, plus 4, 12. So positive sum is 12 and 4 negative values are available minus 1, minus 2, minus 2, minus 1. So they are added to minus 6. So this way we are successfully calculating positive values sum separately and negative values sum separately with the help of this program. So I hope you have understood how we can pass array into function and how we can calculate sum of positive and negative values which are available in array separately. If you want to watch more programming related videos you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tech spoon. You can download my programming app TechMS which is available on Google Play. Thank you for watching this video.