// C program to illustrate
// strcpy() function ic C/C++
#include<stdio.h>
#include<string.h>
int main ()
{
char str1[]="Hello Geeks!";
char str2[] = "GeeksforGeeks";
char str3[40];
char str4[40];
char str5[] = "GfG";
strcpy(str2, str1);
strcpy(str3, "Copy successful");
strcpy(str4, str5);
printf ("str1: %s
str2: %s
str3: %s
str4:
%s
", str1, str2, str3, str4);
return 0;
}
strcpy(ch,n,p) copy string in c
str1: Hello Geeks!
str2: Hello Geeks!
str3: Copy successful
str4: GfG