 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate some of even and odd elements which are available 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 Techimace which is available on Google Play. Now here in this video I am going to implement a code in front of you in C programming which will calculate some of even and odd elements available in 2D array. So first I have included a header file then I am implementing main function. Inside main I am declaring a 2D array of dimension 3 by 3 then IJ then S1 equals to 0 and S2 equals to 0. After declaration of these variables I am writing printf statement which will display the message enter elements on console then I am implementing for loop. So this is first for loop which will repeat 3 times. Now second for loop it will also repeat 10 times sorry 3 times and then scanner statements. So this scanner statement will read the elements entered by the user. So these block contains reading statements. After reading operation I am implementing another loop. Inside I loop I am implementing J loop which will point columns. Inside this loop I am going to implement if condition if a of IJ modulus 2w equals to 0. So if array element which is available in AIJ position is divisible by 2 then it is even. So I am adding that number into S1 variable. So the statement is S1 equals to S1 plus a of IJ. If this condition is false then number is odd so I am adding that number into S2 variable. So the statement is S2 equals to S2 plus AIJ. So with this way I have calculated sum of T1 numbers and odd numbers separately in S1 and S2 variables respectively. After completion of this loop I am going to display the result on console. So even sum equals to %d or sum equals to %d, S1, S2 and then at last returns 0. So this way I have implemented the logic for you in C programming. Now I am executing this code. You can see it is asking for elements. So I have to enter 3 by 3 matrix. So I am entering numbers now. You can see the result even sum is 20 and odd sum is 25. So the number 2, 4, 6 and 8 these are even numbers. So 8 plus 6, 14 plus 4 sorry 8 plus 6 is 14 plus 4, 18 plus 2, 20. So even sum is correct. Then 9 plus 7, 16 plus 5, 21 plus 3, 24 plus 1, 25. So this is odd sum 25. So this program is working properly. It is calculating all the, it is calculating sum of all even numbers and sum of all odd numbers which are available inside 2D array. I hope you have understood how this program is working. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com. You can download my programming app Takamis which is available on Google Play. Thank you for watching this video.