Count the Occurrences of a Value in an Array | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Nice Serie, Thanks :

int Occurences (int *array, int length, int to_find){
int count = 0;
for(int i = 0 ; i < length ; i++){
if(array[i] == to_find){
++count;
}
}
return count;
}

justcurious
Автор

very enjoyable to watch and learn at the same time. I would like to see if at the end of each lesson you throw an exercise with additional complexity for practice and get more interaction with your followers(Learners like me). thank you

naboulsikhalid
Автор

Hi, great video!
I've learned a lot from these exercise videos and i understand the logic as well. After each video, i try to create these codes on my own and it's been a great learning experience. Thankyou for sharing this information!!

Quick question though: once I'm done with this exercise playlist, how do I progress further?
Do these exercise questions get asked in Interviews?

And could you share an example of these exercises are used in real life projects or applications?
Thanks in advance:)

SketchupGuru
Автор

These are great little exercises, but I find myself having to constantly pause to keep up with your speed

food_fondler
Автор

Great video. I have a question. How do you find the number of all repeated values in an array which size is given by the user and the numbers are random numbers? Example n=10, a[n]={1, 1, 2, 2, 3, 3, 3, 4, 4, 4} and i need it to print the number of occurrences of every number in the array. Thank you!

andrejpoljakovic
Автор

What if we wanted the program to print which numbers were repeated without us typing the numbers

nour
Автор

How can i count all the numbers: 0~9; make the output like : 0s found 0; 1s found 1; 2s found 1; 3s found 9s found

zhenghaokang
Автор

How to find items are less than 100 for example and print “ there 5 items less than 100 “

xbq
Автор

sir please say how to find all elements counts please sir🙏🙏🙏.

chandu
Автор

How can i count the values between 5 and 8 ( example)?

boborafg