&gt; In particular, they put 0…N NUL bytes at the end, but you usually want exactly one NUL byte, no more, no less.<p>strncpy() does that but strncat() does not.<p>strncat(s1,s2,size) is usually wrong for a different reason: the size argument specifies how many bytes to copy from s2 to the end of s1 (<i>not</i> including the trailing NULL). This means to not buffer overflow your s1 you need to call it like this<p><pre><code>  strncat(s1, s2, sizeof(s1) - strlen(s1) - 1);
</code></pre>
...Which of course everyone forgets. strlcat() is a nice replacement because it does that calculation for you, so you can just do:<p><pre><code>  strlcat(s1, s2, sizeof(s1));
</code></pre>
and you won&#x27;t buffer overflow your s1.