 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can count how many numbers are even and how many numbers are odd in array by passing array into function. Before starting, you can note my information. You can follow or subscribe my YouTube channel through the link youtube.com slash sanjaygupta underscore you can download my programming app tech image which is available on Google Play. Now here I am going to implement the code in C programming for you. So first of all, I am including a header file that is STDIO dotage. Then I am declaring a function void count int subscript. So this is function call function declaration return type of function is void name of function is count and here an integer array will be passed as argument. Then I am defining main function inside main. I am declaring an array and I then with the help of printf I am going to display the message enter 10 numbers. Then I am implementing for loop which will repeat 10 times and it will repeat scanf statement 10 times and all the entered number will be stored inside array. After reading operation, I am calling function count and I am passing a array inside it. So this statement is function calling and after that return zero. This is the complete implementation of main function. Now I am going to implement count function. This is function definition inside this function definition. I am declaring three variables I C1 and C2 C1 and C2 are initialized with zero. Then I am implementing for loop which will repeat 10 times inside this for loop. I am going to check whether the number is even or odd. So for that purpose I am dividing a of i by 2 if it is equals to zero it means a of i is even number. So I am applying C1 plus plus else C2 plus plus. So with this loop I am checking array element if it is divisible by 2 then it is even. So counter one will be incremented by one and otherwise counter two will be incremented by one. So these counter variables C1 and C2 are counting how many numbers are even and how many numbers are odd. To display the result on console after completion of this loop I am implementing printf which will display even numbers sorry even equals to percent d slash n odd equals to percent d then C1 comma C2. So this is the complete implementation of the program. Here I have passed an array into count function. Count function is counting how many numbers are even and odd into C1 and C2 then it is printing the result on console with the help of printf. Now I am executing this code. It is asking for 10 numbers. I am entering 10 elements starting from 1 to 10. You can see the output even equals to 5 and odd equals to 5. So it is printing proper results. So this way you can count how many numbers are even and how many numbers are odd which are available in array and I have passed array into function. I hope you have understood the logic 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 TechSchool. You can download my programming app TechMS which is available on Google Play. Thank you for watching this video.