strcpy

John Young jgy at hropus.UUCP
Tue Mar 29 15:07:42 AEST 1988


> In article <90 at hropus.UUCP> John Young <hropus!jgy> writes:
> >If the "contents of the destination string past the null character"
> >are not guaranteed why would anyone use strcpy()? 
> 
> Well, at the risk of sounding flippant, one would use strcpy() to make
> a copy of a string.  I personally don't use strcpy() for any other
> reason, and I don't see how writing past the null but within the
> bounds of the destination array would preclude this.
> 
> [In a previous posting I retracted my statement that strcpy() could
> write something past the null in the destination string.]
> 

There was no mention of "within the bounds of the destination array"
in the origonal posting.  How would you suggest strcpy() check for
this?  Good thing you retracted your statement (I didn't see it!)



More information about the Comp.lang.c mailing list