strcpy —
copy a string without bounds checking
#include
<string.h>
char *
strcpy(
char
*dst,
const char
*src);
The
strcpy() function copies the string
src (including the terminating
‘
\0’ character) to the buffer
dst.
No bounds checking is performed. If the buffer
dst is not large enough to hold the result,
subsequent memory will be damaged.
If the
src string is inside the
dst buffer, the behavior is undefined.
The
strcpy() function returns
dst.
strlcpy(3),
wcscpy(3),
wcslcpy(3)
The
strcpy() function conforms to
ANSI X3.159-1989
(“ANSI C89”).
The
strcpy() function first appeared in the
Programmer's Workbench (PWB/UNIX) and was ported to
Version 7 AT&T UNIX.