 Hello friends I am Sanjay Gupta in this video I am going to demonstrate you how you can count even and odd numbers present in array by passing array into function using pointer. 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 tech image which is available on google play now I am going to implement solution of this problem so first time including a header file that is stdio.h now I am declaring a function whose name is count its return type is void and it will receive an argument that is address of base location of array so this statement is function declaration now I am going to define main function inside main I am declaring two variables first one is array and second one is integer variable I now with the help of printf the masses enter 10 elements will be displayed on console to read the element from user I am applying this for loop which will repeat 10 times and it will read 10 elements from user and all the elements will be stored inside array A now I am calling count function in this I am passing array A so count is called here and I am passing a array into it so its base address will be passed in function definition and then return zero this is the implementation of main function now I have to define definition of count function so for that purpose I have implemented this block this block will be known as function definition inside this function I am declaring some variables so total three variables are declared I C1 and C2 C1 C2 are initialized with zero now I am going to implement for loop this for loop will repeat 10 times inside this for loop I have to apply the condition which will check whether the element is even or odd so this is the condition here asterisk p is divided by two if its remainder is zero then number is even otherwise it is odd so p is containing base address of the array to receive element which is available on base location I have used asterisk p so if this condition is true then C1 will be incremented by one if this condition is false then C2 will be incremented by one now after this if else condition p will be incremented so p++ will be shifting pointer through first location to second location of array so whenever we want to jump to different locations of array we have to increase the address which is stored inside pointer through p++ or that variable and plus plus operator so this way 10 times this loop will repeat 10 times condition will be checked and p will be incremented to provide the locations of array through its address after completion of this loop I can print the counted values on console with the help of printf so even equals to %d and odd equals to %d comma C1 comma C2 so with this printf the results of counted values will be displayed on console through C1 and C2 so this way I have implemented the complete code in front of you now I am going to execute this code so it is asking for elements so I am entering 10 elements you can see the output even numbers are 5 and odd numbers are 5 so the input contains 5 even and 5 odd elements so output is printed correctly so this way I have implemented this program by passing array into function using pointer to count how many even and odd numbers are available in array I hope you have understood the logic if you want to watch more programming related videos you can follow or subscribe my youtube channel through the url youtube.com slash tanja gupta underscore tech school you can download my programming app tech immense which is available on google play thank you for watching this video