We provide help, or answers to specific questions..So what have you tried so far? What is your specific question?
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
One way to do that is to create a structure that contains the strings and an integer
struct words
{
char* word;
int count;
};
Now make a simple array of these structures and initialize all counts to 0 and character arrays to the words in the list you posted.
Next, open and read the file one word at a time. fscanf("%s" ...) would be best in this program. For each word read, search the array for it and if found increment the counter.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343