Copies a source string of a specified length to a destination storage area.
char *strncpy (char *s1, const char *s2, size_t n);
s1 Pointer to destination storage area
n Number of characters to be copied
The strncpy function copies up to n characters from the beginning of the string pointed by s2 to a storage area pointed by s1. If the length of the string specified by s2 is shorter than n characters, the function elongates the string to the length by padding with null characters.
If the length of the string specified by s2 is longer than n characters, the copied string in s1 storage area ends with a character other than the null character.