frequency of charecters of a string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nityagopikrishnan
    New Member
    • Sep 2008
    • 2

    #1

    frequency of charecters of a string

    how do we write a programme to find the frq of charecters of a string
    eg you are great
    output
    no of y=1
    no of o=1
    no of u=1
    no of a=2
    no of r=2
    no of e =2
    no of g=1
    no of t=1
  • curiously enough
    New Member
    • Aug 2008
    • 79

    #2
    You can use an array of structures of size 26 that contains all the letters in the english alphabet filled chronologically , where every structure consists of a charachter value corresponding to a distinct letter and an integer value for the frequency of that letter. Then print the frequency of of every charachter using the condition that the frequency is not zero. I would give you the code but it would get deleted.

    Comment

    • Man4ish
      New Member
      • Mar 2008
      • 151

      #3
      This code has been removed per Posting Guidelines.

      Comment

      Working...