Counting Occurrences in char array
<p>Write a function that accepts a character array as input, counts the number of occurrences for each character in the array, and outputs the result in format(eg {'c', 'e', 'e', 'e', 'a', 'q'} would be</p>

<pre><code>a - *
c - *
e - ***
q - *
</code></pre>

<p>I tried again with the dictionary but how do I get the asterisk </p>

<pre><code>    class Program
    {
    public static void Main()
    {
        char[] characters = { 'c', 'e', 'e', 'e', 'a', 'q' };
        charFuction(characters);
    }

    static Dictionary&lt;char, int&gt; occurrences = new Dictionary&lt;char, int&gt;();
    static void charFuction(char[] characters)
    {
        foreach(char c in characters)
        {
            if (occurrences.ContainsKey(c))
            {
                occurrences[c]++;
            }
            else
            {
                occurrences.Add(c, 1);
            }
        }
        foreach(char k in occurrences.Keys)
        {
            Console.WriteLine(k + " - " + occurrences[k]);
        }
    }
</code></pre>