I have to read the string \"hello world\" and output each letter\'s frequency using only for loops. The instructor hinted that I\'d need to use two loops and ga
\"hello world\"
I would use a simple array. Simply convert each letter to an index and increment the array at that index.
int letters[26]; int index = ch - 'a'; letters[index]++;