[COMP] Re: C program to count the number of words in a text file
- From: "Aamir" <u970001@xxxxxxxxxxx>
- To: <computers@xxxxxxxxxxxxxxxxx>
- Date: Tue, 1 May 2001 01:06:54 +0500
link List is a pretty easy solution to this problem
but using arrays .... ummmmmm
i cannot seem to get it anyways
how will you keep track of words... i mean using link list, its easy to
update the count once you get the word..
but in array (not an array of link list nodes ofcourse). there is no way
( i think)
any concerns ???
regards,
Aamir
----- Original Message -----
From: "Shane McKeown" <shane_mckeown@xxxxxxxxx>
To: <computers@xxxxxxxxxxxxx>
Sent: Tuesday, May 01, 2001 12:45 AM
Subject: [COMP] C program to count the number of words in a text file
Hi guys
I have a small problem. A friend needs help writing a
C program which has to read a text file, and count
the number of occurences of each word in the file.
I know this can be done using Linked-Lists, but his
version needs to use arrays.
The input file has the following:
TO BE OR NOT TO BE
and the output should be somthing like:
Word Occurences
------------------
TO 2
BE 2
OR 1
NOT 1
Can anyone help, or know of anyone that can help?
Thanks
Shane
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
========================================
Avenir Web's Computers Mailing List
List Modes, Subscription, and General Info:
Go to http://www.freelists.org/cgi-bin/webpage?webpage_id=11
List Archives: http://www.freelists.org/archives/computers
Administrative Contact: weez@xxxxxxxxxxxxx
Get computer help: http://avenir.dhs.org
========================================
========================================
Avenir Web's Computers Mailing List
List Modes, Subscription, and General Info:
Go to http://www.freelists.org/cgi-bin/webpage?webpage_id=11
List Archives: http://www.freelists.org/archives/computers
Administrative Contact: weez@xxxxxxxxxxxxx
Get computer help: http://avenir.dhs.org
========================================
- References:
- [COMP] C program to count the number of words in a text file
- From: Shane McKeown
Other related posts:
- » [COMP] C program to count the number of words in a text file
- » [COMP] Re: C program to count the number of words in a text file
- » [COMP] Re: C program to count the number of words in a text file
- » [COMP] Re: C program to count the number of words in a text file
- » [COMP] Re: C program to count the number of words in a text file
- [COMP] C program to count the number of words in a text file
- From: Shane McKeown