title: Count the number of occurrences of each letter in string
body: <p>How can I count the number of occurrences in c of each letter (ignoring case) in the string? So that it would print out <code>letter: # number of occurences</code>, I have code to count the occurences of one letter, but how can I count the occurence of each letter in the string?</p>
  
  <pre><code>{
      char
      int count = 0;
      int i;
  
      //int length = strlen(string);
  
      for (i = 0; i &lt; 20; i++)
      {
          if (string[i] == ch)
          {
              count++;
          }
      }
  
      return count;
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>a : 1
  b : 0
  c : 2
  etc...
  </code></pre>