Technical Support
On-Line Manuals
C166 User's Guide
#include <string.h> signed char *strcpy ( signed char *dst, /* destination string */ const signed char *src); /* source string */
The strcpy function copies characters from src to dst up to and including the terminating null character.
The strcpy function returns dst.
strcat, strlen, strncat, strncpy
#include <string.h> #include <stdio.h> /* for printf */ void tst_strcpy (void) { char buf [21]; char s [] = "Test String"; strcpy (buf, s); strcat (buf, " #2"); printf ("new string is %s\n", buf); }