Basically, strncpy and strncat shouldn&#x27;t be used because they don&#x27;t do what you want. You want a NUL terminated string without buffer overflow, but these functions instead work with fixed size strings. They&#x27;re simply designed to perform a different task.  In particular, they put 0…N NUL bytes at the end, but you usually want exactly one NUL byte, no more, no less.