strcpy

Dave Sill dsill at NSWC-OAS.arpa
Sat Apr 2 00:06:58 AEST 1988


>> It does indeed say that the copying stops after the null has been
>> copied.  But this in no way indicates that no more copying occurs after
>> the copy of the null has been made.
>
>Huh?

It means the copying does not stop until the null is copied.

This reminds me of the Saturday Night Live sketch with Ed Asner as the
nuclear plant manager going on vacation whose parting advice is "You
can't use too much cooling water in a nuclear reactor."

The intent of the statement:
     Strcpy copies string s2 to	s1, stopping after the null char-
     acter has been moved.
is that all characters in s2, up to and including the terminating
null, are copied to s1.  Nothing at all is said about the the order in
which the copying takes place.  To assume that all implementations
copy from right-to-left or left-to-right is plainly wrong.



More information about the Comp.lang.c mailing list