To copy strings, use the strcpy() function. It copies the string specified by source into the destination. This function takes two pointer to char or array of characters arguments and returns a pointer to the first string that is destination.
The strcpy() function is a standard library function. It is used to copy a string from one location to another. In C, it is declared in the “string. h” header file, whereas in C++, it is declared in the “cstring” header file. It returns the destination pointer. Here we have executed the string copy function in c