title: Progress of recursive functions on strings
body: <p>I have been trying to understand process of recursion. Unfortunately, I can't get the solving method. I mean "<em>tracing</em>" of recursion on strings. Can you explain me why <code>&amp;str[1]</code> is used ? How are <code>&amp;str[1]</code> and the recursive function progressing ? I want to understand indeed. Thank you for all appreciated answers. I think I need all nuances. </p>
  
  <pre><code>/*Figure 10.4  Recursive Function to Count a Character in a String*/
  /*
   *  Count the number of occurrences of character ch in string str
   */
  int
  count(char ch, const char *str)
  {
        int ans;
  
        if (str[0] == '\0')                           /*  simple case  */
              ans = 0;
        else                      /*  redefine problem using recursion */
              if (ch == str[0])   /*  first character must be counted  */
                    ans = 1 + count(ch, &amp;str[1]);
              else                /*  first character is not counted   */
                    ans = count(ch, &amp;str[1]);
  
        return (ans);
  }
  </code></pre>