Richard already gave you the 'clean' solution.
Since you're storing the generated random number in the
arrNum
array, there is the alternative to compute the requested values, without using addional arrays. However you have to use a couple of nested iterations:
int most_often_number = 0;
int most_often_occurrences = 0;
for (n=1; n<=10; ++n)
{
int occurrences = 0;
for (i=0; i<amount; ++i)
{
if ( arrNumn[i] == n )
++occurrences:
}
if ( most_often_occurrences < occurrences )
{
most_often_occurrences = occurrences;
most_often_number = n;
}
}