 Hello friends. I am Sanjay Gupta. In this video, I'm going to demonstrate you how you can print some of even and odd values available in array by passing 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 TechMS, which is available on Google Play. Now coming on to the program, I'm going to implement this code in C. So first I am including a header file. S T D I O dot H. Then I have to declare a function void some in square records. So here you can see written type of function is void. Name of function is some and it will be receiving an argument of integer type that will be array. So this statement is function declaration. Then in main inside main function, I'm declaring an array and I variable. Then with the help of printf, I'm going to display the message. Enter 10 elements on console. Then follow I equals to zero. I less than 10. I plus plus this loop will repeat scan of statement. 10 times and all 10 numbers will be stored at different indexes of a array. Now I'm calling some function and I'm passing a array inside it. So this statement is function calling and then return zero. Now function definition. So here written type is void. Name of function is some and it is receiving an argument into a array. So this block will be known as function definition inside this function definition. I have to provide the logic which can check whether the element which is available inside array is even or odd. So for that purpose, I'm using these variables because after checking I have to calculate the sum of even and odd values separately. So I am implementing a for loop inside this for loop. I am implementing a condition if a of I is modulus to double equals to zero. So a of I is representing array element. If a of I is completely divisible by two, it means array element is even or even value. So I can add that value into S1 with this notation. Then else S2 equals to S2 plus a of I. So if this condition is true, then a number is even. So that number will be added into S1. If this condition is false, then control will be transferred to S sorry else and then odd number will be added into S2. So this way loop will be adding even and odd elements separately into S1 and S2. After completion of this loop, I have to print both the results on console with the help of printf. So for that purpose, I'm using these messages. So you can see the printf. It will display even some then even some value then odd sum equals to this person D will be replaced by S2. So this way some of even values and some of odd values will be displayed on console separately. You have to notice that written type of some function is void because here two values are calculated and a function can return only one value. That's why I have used written type void and I have used printf inside this function definition. So this is the complete code. Now I am executing this code. You can see it is asking for 10 elements. So I am entering 10 numbers. Now output is some even some is 30 and odd some is 25. So 2, 4, 6, 8 and 10 are added and the result is 30 and 1, 3, 5, 7 and 9 are added and result is 25. So all even numbers are added separately and all odd numbers are added separately and the results are displayed in front of you. So this way you can pass an array into a function and you can calculate even and odd sum separately. 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 Techimace which is available on Google Play. Thank you for watching this video.