strcpy(3) CLIX strcpy(3)
NAME
strcpy - Copies a string
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <string.h>
char *strcpy(
char * string1 ,
char * string2 );
PARAMETERS
string1
A pointer to a character string
string2
A pointer to a character string
DESCRIPTION
The strcpy() function copies the string pointed to by the string2
parameter, including the terminating null character, to the location
pointed to by the string1 parameter. When operating on overlapping
strings, the behavior of this function is unreliable.
EXAMPLES
#include <string.h>
main()
{
char string1[20];
char *string2 = "hello world!";
/* copy "hello world!" into string1 */
strcpy (string1, string2);
}
CAUTIONS
When operating on overlapping strings, the behavior of this function is
unreliable.
RELATED INFORMATION
2/94 - Intergraph Corporation 1
strcpy(3) CLIX strcpy(3)
Functions: index(3), rindex(3), strcat(3), strcmp(3), strcspn(3),
strchr(3), strlen(3), strncat(3), strncmp(3), strncpy(3), strpbrk(3),
strrchr(3), strspn(3)
2 Intergraph Corporation - 2/94