title: strcat implementation
body: <p>I tried to implement the strcat by myself, and I found the strcat implementation from <a href="http://en.wikipedia.org/wiki/Strcat" rel="noreferrer">Wiki</a> like this......but when I use it, there is segmentation fault.</p>
  
  <p>What's wrong with the code below?</p>
  
  <pre><code>char *
  strcat(char *dest, const char *src)
  {
      size_t i,j;
      for (i = 0; dest[i] != '\0'; i++)
          ;
      for (j = 0; src[j] != '\0'; j++)
          dest[i+j] = src[j];
      dest[i+j] = '\0';
      return dest;
  }
  </code></pre>