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

Urgent need of code in C

P: 1
Hey guys,
hope you could help me,
i am writing a program in which it reads a file text and than generates a report containing a list of words of 1letter, 2letters..
every list should be made in an alphabetical order.
for example the report should be like this:

word of 1 lettre(s) :
a
l

word of 2 lettre(s) :
by
of
an

word of 5 lettre(s) :
begin
start


Hope you guys could help me ASAP
Sep 25 '06 #1
Share this Question
Share on Google+
7 Replies


10K+
P: 13,264
Hey guys,
hope you could help me,
i am writing a program in which it reads a file text and than generates a report containing a list of words of 1letter, 2letters..
every list should be made in an alphabetical order.
for example the report should be like this:

word of 1 lettre(s) :
a
l

word of 2 lettre(s) :
by
of
an

word of 5 lettre(s) :
begin
start


Hope you guys could help me ASAP

Do you know how to read a file?
You are most likely going to have to write this yourself. So I'd suggest you really make a start. Try to write down the logic of it and the steps required to achieve your goal even in english, you'll find it will be easier to write the code after that.
Sep 26 '06 #2

P: 41
steps:
1/ read file
2/ parse data : use space, dot...as separators
3/ check word if exists and add to list
that's all
:D
Sep 29 '06 #3

P: 10
an should come befoe by in the 2 letter words? unline in your example
Sep 29 '06 #4

P: 2
i need to understand......d concepts ot link lists....queues..stacks...
nd implement dem in...evc++
can nyone plz help me out wid dis....!!!
Sep 30 '06 #5

P: 2
hello..

can nyone heer me...?

den plz help me out..!!!!!!

i jus cant implement dem...in EVC++....
i had earlier tried it in C....
Sep 30 '06 #6

100+
P: 293
D_C
You may want a linked list of linked lists. The second list has all N letter words sorted in alphabetical order. The first list has each N, sorted in increasing order.

1. Open the file
2. Parse out each word
3. Add it appropriately to the following data structure.
4. When EOF, traverse and print the data structure.

Example: The quick brown fox jumped over the lazy dog
Expand|Select|Wrap|Line Numbers
  1. 3 -> The -> dog -> fox -> the -> NULL
  2. |
  3. v
  4. 4 -> over -> lazy -> NULL
  5. |
  6. v
  7. 5 -> brown -> quick -> NULL
  8. |
  9. v
  10. 6 -> jumped -> NULL
  11. |
  12. v
  13. NULL
Sep 30 '06 #7

P: 41
i need to understand......d concepts ot link lists....queues..stacks...
nd implement dem in...evc++
can nyone plz help me out wid dis....!!!
i think you need to read data structures and algorithms books
search in the net
Oct 1 '06 #8

Post your reply

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