strncpy, when used as designed, can leave the target array without a terminating null character. Using that array later with any string function causes undefined behavior.
strcpy, when used as designed, always leaves the target array properly null-terminated. Using it properly is a bit more difficult; you have to make sure the target array is big enough to hold the source string.
strcpy, when used as designed, always leaves the target array properly null-terminated. Using it properly is a bit more difficult; you have to make sure the target array is big enough to hold the source string.
This sequence:
does what most people probably assume strncpy should do (assuming target is defined as an array rather than as a pointer).