-strcpy() is a string function that are able to copy one string into the other string.
-It is predefined in string.h header file.
Syntax-
strcpy(string1,string2)
-It copy content of string2 in string1
program-
#include< stdio.h>
#include< string.h>
int main()
{
char s1[20],s2[20];
//input of string
printf("Enter first string\n");
scanf("%s",&s1);
//copy s1 into s2
strcpy(s2,s1);
printf("Now second string is %s",s2);
}
Enter first string
Mystring
Now second string is Mystring