1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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,012
    Likes Received:
    203
    Trophy Points:
    0
    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