It puts zeros to unused bytes in the destination. Here&#x27;s a note from its man page:<p>Some programmers consider strncpy() to be inefficient and error prone.  If the programmer knows (i.e., includes code  to  test!) that the size of dest is greater than the length of src, then strcpy() can be used.<p>One valid (and intended) use of strncpy() is to copy a C string to a fixed-length buffer while ensuring both that the buffer is not overflowed and that unused bytes in the target buffer are zeroed out.