TWO Arrays problem

Hi,
Can someone help me with the problem. I don't need the solution, I just need some hints where to start. I'm completely lost. My professor is not good with explaining how everything works. I appreciate any help. Thank you.

Write a program that will read a line of text and output a list of all the letters that
occur in the text together with the number of times each letter occurs in the line. End
the line with a period that serves as a sentinel value or delimiting character. The
letters should be listed in the following order: the most frequently occurring letter, the
next most frequently occurring letter, and so forth. Letters having the same number
of occurrence should follow alphabetical order.
Use two arrays, one to hold letters and one to hold integers. You may assume that the
input uses all lowercase letters. For example, the input
do be go bo.
Should produce output similar to the following:
Letter
o
b
d
e
g


Numbers of Occurrence
3
2
1
1
1
Note: you can modify the implementation of the selection sort algorithm in the book
to sort the array in descending order. You can use either string type or c-string
type in your program.
Well, I think the way to go about it would be... Well, you have a string. You need to take that string and find out how many times each letter occurs and put that into an array. You then need a second array for the characters. When I access occurrence[1], it should be describing the letter found in letter[1].
Do I need to create separate text file with "do be go bo" words ? or I can do something like this :

char arr[ ] = "do be go bo";

Topic archived. No new replies allowed.