The strcopy copies a string to another pointer. You copy the entire string and the string ends with the \ 0 included. On the destination pointer begins to put the string of the origin, you have the content in duplicate pointed each by its pointer.
#include <stdio.h>
#include <string.h>
int main()
{
char src[40];
char dest[100];
memset(dest, '#include <stdio.h>
#include <string.h>
int main()
{
char src[40];
char dest[100];
memset(dest, '%pre%', sizeof(dest));
strcpy(src, "Hola buenos días");
strcpy(dest, src);
printf("String final : %s\n", dest);
return(0);
}
', sizeof(dest));
strcpy(src, "Hola buenos días");
strcpy(dest, src);
printf("String final : %s\n", dest);
return(0);
}
This prints "Final String: Hello, good morning"