Mega Code Archive
Copy bytes to buffer from buffer how to use memcpy
#include
#include
int main ()
{
char str1[]="I am Superman.";
char str2[40];
char str3[40];
memcpy (str2, str1, strlen(str1) + 1);
memcpy (str3, "copy successful", 16);
printf ("str1= %s\n str2= %s\n str3= %s\n", str1, str2, str3);
return 0;
}