Dear experienced programmers,

I was working on program that counts the frequency
distribution of a characters in a file. the algorithm is as follows :
1.open a file
2.read the first character and put it in an array
that counts the single character called singles[]
3. read the second charcter and put it in array
that counts the double called doubles[].
4. then read the rest of the file and update the relevant array

5. finally display the statistic of singles,doubles and triples.

here is my problem when I run the program
it only displays the singles result, but the program doesn't execute
the second character loop and the loop that does the rest of the charcter read(3rd while loop).

I am loosing the head why it doesn't excute that
portion of the code.

I AM NOT EXPECTING SOMEONE TO DO IT FOR ME BUT
DESREVE TO BE GUIDED SLOWLY TO SOLVE THE PROBLEM.

THANKS IN ADVANCE