strncpy

Bill Poser poser at csli.Stanford.EDU
Wed Jan 24 10:48:02 AEST 1990


Just a note to point out that the test of printf-ing the result of a
strncpy is not sufficient to show that it stops copying at the null byte
(contrary to my previous statement). It is necessary to check what character
is in the target string after the null. As my previous message shows, this
is in fact a null, showing that copying does stop at the null byte.



More information about the Comp.lang.c mailing list