3 ms·Watch out: what strncpy does is usually not what you'd want it to do.by saagarjha 7y agoWatch out: what strncpy does is usually not what you'd want it to do.shawxe 7y agoThat's what strlcpy() is for.saagarjha 7y agoOr strncpy, if you'd like to stay within the standard and your strings are small.