fopen, word_count, word compare help needed

I am new in C programming and I would like help to make the following program:

A program that reads a file (file name you can get from command line arguments or
ask from the user) and produces output that counts the 10 most frequent words in the file
and their frequencies and percentages of all the words. A word with one alphabetic
characters separated by whitespace ( space, tab or newline) or punctuation marks such as
ʻ,ʼ , ʻ.ʼ etc.
Use functions to structure your program.

When you post code ALWAYS highlight it, and click on the [code] icon at the top of the advanced editor window. That will keep your code, looking good, and easy to study.

And please - just black. Save the red or green for a special highlight for some block or line of code.

So your algorithm here is to first, break up the text into it's words, and write them out to a file. Then what?

What hints did your teacher give you for this assignment?

I'd be tempted to put each word into a 2D array, and then sort them. Then work on the stats needed (since repeated words would be right next to each other then).

It's good to post up your code, so we can see what you're talking about, but it's just as important to ask the specific questions that relate to C. The broad questions/statements like "This doesn't work", really aren't that helpful. You know your teacher, have class notes and reference books you've been reading (hopefully), etc. For that reason the idea department on these programs, kind of falls into your territory, by default.

Think about it, and pop back when you need us - we're here. ;)

If nothing else comes to mind, ask yourself "How would I do this by hand, with paper and pencil". The answer is almost always easier, and can translate into a pseudo-code and then into a program.