 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 2D array. 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 here in this video, I am going to demonstrate how you can count even and odd values available in 2D array with the help of C program. So first I am including a header file that is stdio.h then main function inside main function I am declaring a 2D array of dimension 3 by 3 then ij variables and c1 equals to 0 and c2 equals to 0. These two variables c1 and c2 will be counting quantities of even and odd values. Now I am going to display a message on console using printf enter elements. To receive these values, I have to implement nested loops. So first loop is i which will repeat three times. Inside this loop, I am implementing another loop which will also repeat three times. So i loop is for rows and j loop is for columns. Inside these loops, I am writing scanf statement which will repeat to receive the elements entered by the user. So this is the reading process. After reading operation, I have to implement these loops again so that I can check whether the entered number is even or odd. So again I am implementing combination of nested loops. Here I am implementing if condition aij modulus 2 w equals to 0. So if this condition is true, it means number is even. So I am counting c1 plus plus. If this condition is false then c2 plus plus. So if condition is true, it means number is even. So c1 is counted by 1 and if condition is false then c2 is counted by 1. So c2 is calculating quantities of odd values and c1 is calculating quantities of even values. So counts even quantity and c2 counts odd quantity. After completion of these two loops, the nested loop formation, I have to print the calculated result on console. So I am printing even equals to percent d slash n odd equals to percent d then c1 comma c2. So with this, the values will be displayed on console and then return 0. So this is the complete implementation of the program with help of c programming. It is counting how many numbers are even and how many numbers are odd. So now I am executing this code. I am entering the numbers. You can see the output. Resulted result is displayed. Even are four and odd are five. So one, three, five, seven, nine, five elements are odd. Two, four, six, eight, four elements are even. So the program is working properly. It is printing proper even and odd quantities which are available in 2d array. So I hope you have understood how we can count how many numbers are even and how many numbers are odd in 2d array. 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 school. You can download my programming app Techamance which is available on google play. Thank you for watching this video.