Computer Science Canada hello There |
Author: | thamilan [ Wed Aug 13, 2008 7:21 pm ] |
Post subject: | hello There |
i want to make a program in c : but am a bit stuck, so can you anyone jst guide me through it. Basically the program has to read in a whole paragraph, and the the program will have to find the words in the paragraph, then it has to sort the words into alphabetically order and and also count the number of times the word appeared in the paragraph and then print, the words in alphabetically order with the frequency. cheers , if anyone can just guide me through it it would be good. Ps i have developed the sorting algorithm for the program... its an insertion sort. |
Author: | Dan [ Wed Aug 13, 2008 7:45 pm ] |
Post subject: | RE:hello There |
Well we can help better if you give it a try first and post your code. You will need to learn about the fallowing (as a minum) to do it:
|
Author: | michaelp [ Wed Aug 13, 2008 8:33 pm ] |
Post subject: | RE:hello There |
http://compsci.ca/v3/viewtopic.php?t=12911 That tutorial from wtd should help get you started. |
Author: | CodeMonkey2000 [ Wed Aug 13, 2008 8:39 pm ] |
Post subject: | RE:hello There |
Using C++ for this would be a lot easier. With C you might need to implement some sort of linked list structure, or something with dynamic memory allocation, since you don't know how many words there are. |
Author: | Tony [ Wed Aug 13, 2008 9:15 pm ] |
Post subject: | RE:hello There |
Using Python or Ruby or anything that supports working with text would be a lot easier. |
Author: | md [ Wed Aug 13, 2008 9:44 pm ] |
Post subject: | RE:hello There |
Awk would be great for this. |
Author: | wtd [ Wed Aug 13, 2008 9:59 pm ] |
Post subject: | RE:hello There |
Paying one of us several hundred dollars to do it for you would be tremendously easier. |
Author: | md [ Wed Aug 13, 2008 10:00 pm ] |
Post subject: | RE:hello There |
I'll do it for less then wtd. $100 |