strcpy函数
#include<stdio.h>
char *mystrcpy(char *str, const char *ptr)
{
char *tmp = str;
while((*str++ = *ptr++) != '\0');
return tmp;
}
int main()
{
char str[20] = "helloworld";
char ptr[20] = "world";
mystrcpy(str, ptr);
printf("%s\n", str);
return 0;
}