title: Why not use pointer to pointer when reversing a string?
body: <p>I have seen this code:</p>
  
  <pre><code>void reverse_string(char *str)
  {
      /* skip null */
      if (str == 0)
      {
          return;
      }
  
      /* skip empty string */
      if (*str == 0)
      {
          return;
      }
  
      /* get range */
      char *start = str;
      char *end = start + strlen(str) - 1; /* -1 for \0 */
      char temp;
  
      /* reverse */
      while (end &gt; start)
      {
          /* swap */
          temp = *start;
          *start = *end;
          *end = temp;
  
          /* move */
          ++start;
          --end;
      }
  }
  </code></pre>
  
  <p>And I don't understand why a pointer to a pointer is not passed in the function.  How can it be reversed then, if a copy of the passed pointer is made inside the function?  How are the changes being propagated outside?</p>