The purpose of the strncpy is supposedly to perform safe copies so as to not exceed the limits of your string sizes. The problem with the strncpy is that if your source string is longer than your destination string, then the strncpy will NOT NULL terminate the destination string even though you may have been prudent in limiting the number of characters read from the source string to the total size of the destination string minus 1. This means that you must always ensure that your final destination strings are always NULL terminated prior to or just after using the strncpy function. For example: Let’s assume you have defined -> char str[5]; and you issued the command: strncpy(str,”my string”,4); You would have an non terminated str string with “my s” as the first 4 characters. You would have to perform a str[5]=’\0’; or some variation thereof to null terminate the string.