By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,146 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,146 IT Pros & Developers. It's quick & easy.

help!! how to read and store words from file input?

P: 2
im been having difficuties in reading and storing from an input file. the problem goes like this:

Write a program that reads in a whole bunch of words from all file (each word is no more than 20 characters) and spit out the duplicate words. For our purposes, words are to be separated by spaces, commas (,), !, ?, and periods (.). There can be an arbitrary amount of duplicate words. All comparisons should ignore case. Output the duplicate words, one per line, in lower case and in sorted order. Output should be put in a file

Sample Input:

How much wood would a woodchuck chuck if a woodchuck could chuck wood? Well? what do you think? Are you feeling well?

Sample Output:

a
chuck
well
wood
woodchuck
you

can you help me solve this......
Mar 19 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 1,510
post the code you have written so far indicating where you are having problems
Mar 19 '07 #2

P: 2
actually, i dont know how to start solving the problem although i have an idea how... can u help me on this one?
Mar 19 '07 #3

DeMan
100+
P: 1,806
Sure we'll help, but perhaps if you share your idea on how, someone may be able to suggest whether that would be a good start, or whether there might be a better idea we have....
Mar 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.