does any one know how to solve this ?

Discussion in 'C' started by jawjaw, Aug 9, 2009.

  1. jawjaw

    jawjaw New Member

    Joined:
    Aug 9, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    This is somewhat a collective assignment. You did not see such question before. Use parallel arrays to solve this assignment. Write a program that reads a paragraph a text ending with dot ‘.’ and builds a dictionary out of its words. Follow the following steps to build your dictionary:

    • The words are separated by blank characters (assume one blank between each two words).
    • The dictionary is case insensitive. Upper case chars are converted into lower case chars.
    • Duplicated words are not inserted into the dictionary
    • Count and keep track of the number of times each word occurred in the text.
    • Sort the dictionary descendingly with respect to number of occurrences of its words.
    • Print the sorted dictionary one word per line.
    Test your program on the following data:

    This is somewhat a collective assignment
    You did not see such question before
    Use parallel arrays to solve this assignment
    Write a program that reads a paragraph a text ending with dot and builds a dictionary out of its words
    Follow the above steps to build your dictionary
    Hopefully this paragraph is not too long for this assignment.


    Note that i`m not a programmer or computer student :S
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    > Note that i`m not a programmer or computer student

    So why have you been given this assignment?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice