title: Concatenate 3 strings and return a pointer to the new string C
body: <p>I am wondering if anyone could help me, I am trying to concatenate 3 strings and return a pointer to the new string. I can't seem to figure out how to do this using <code>strncat</code> instead of <code>strcat</code> and <code>strncpy</code> instead of <code>strcpy</code>. I am only learning C, so any help will be greatly appreciated.</p>
  <pre><code>char *concatenate(char *a, char *b, char *d) {
      char str[80];
      strcpy(str, a);
      strcat(str, b);
      strcat(str, d); 
      puts(str);
      return (NULL);
  }
  </code></pre>