In over my head with character frequency code

Hi everyone,

I have decided to take a intermediate level C programming course with absolutely no programming experience. Most of the HW involved manipulating integers but the last question involves strings and I don't know how to manipulate them and I am running out of time.

I have to create a program that features a loop that prompts the user to enter a string of lower case letters and tallies the frequency of each character. The code I have does that, but I can't figure out how to phrase the loop condition to that will prompt the user again for a string and then add those character tallies to the total. The program is supposed to keep prompting and adding until an EOF character (CTRL+Z or ^Z) is entered.

All my attempts either go into an infinite loop without printing or overwrites previous counts a new tally for every subsequent string.