You need to design some system to count the number of times each value appears in the array. If you do this with pencil & paper it will become clear how to do it. First start out with a clean sheet of paper, nothing on it. Now write column headings, one called Value and a little but to the right of that name it Count.
Now look at the first number in the array. Its a 1. Is there a 1 on that piece of paper? No because this is the first number, to under the Value column write a 1 and under the Count column write a 1 (first count).
Look at the second number. Its a 2, so is there a 2 under the Value column on the paper? No, so under the Value colum add another line with the Value of 2 and 1 in the Count colunm.
Look at the third number. Its another 2. There is alread a 2 under the Value column so increment is count from 1 to 2.
Do that for each of the other values in the array. After you are done you can easily see which Value has the greatest Count.
The above is the same concept you will use in your program. You could use two arrays of integers or one array of structures, whichever is easiest for you.