 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how to count how many times a number is present in an array. Before starting, you can note my information. You can watch or subscribe my YouTube channel through this URL that is youtube.com slash sanjaygupta underscore tax school. You can download my app based on programming tachymus which is available on Google Play. Now I am going to implement a code in C programming which will demonstrate you how to count how many times a number is present in an array. So first I am including a header file that is stdio.h then main function inside main function I am declaring an array then variable n which will be containing the number which I want to count i and c which is initialized with zero then printf this printf will print a masses enter 10 elements with the help of for loop I will be reading 10 elements from user with the help of this scanf statement. So this for loop will repeat 10 times and the scanf will receive 10 elements and all the all those 10 elements will be stored at different indexes in an array. Now with another printf I want to show this masses enter the number which you want to count and with scanf I am going to receive that number inside variable n. So a is containing 10 different elements and n is containing the number which I want to count. Now again I am implementing for loop inside for loop sorry here I inside for loop I am implementing if condition that is a of i double equals to n. So if this condition is true that means n is equivalence to this a of i which is the array of sorry which is the element stored inside array. So if this condition is true then I can write c plus plus. So if this condition is true then value of c will be incremented by one. So this condition will check 10 times because loop is repeating 10 times. So whenever condition is true then only c will be incremented otherwise not. So after completion of this loop I can print the counted value with the help of c variable and then return 0. So this is the complete implementation which will count a particular number which is available inside array so it will count the frequency how many times that number is available inside the array. Now I am executing this code you can see it is asking 10 elements so I am entering 1 2 3 4 again 1 2 3 4 and 1 2. Now it is asking for the number which I want to search so I am entering 2 so it is showing count equals to 3 that means 2 is available 3 times. So let's check this 2 is available 1 2 and 3 times so output is correct 2 is available 3 times in the array. So friends this way you can read an array and you can read a number which you want to find out how many times it is available inside the array. Then after reading both the entities you can generate a loop which will check occurrence of a particular number inside array and then you can print the counted value on console. So this way I am this way I have implemented the code in c programming so that we can count the number of frequency of a number which is available inside the array. I hope you have understood the concept well if you want to watch more programming related videos you can visit my YouTube channel through the URL that is youtube.com slash sanjay gupta underscore tech school. You can also download my android app that is TechMS which is available on Google Play. If you want to ask any programming related question you can write that in the comment section of this video. I hope you have enjoyed this video. Thank you for watching this video.