strcpy内部结构
#include<stdio.h>
void my_strcpy(char* dest, char* sor)//接收地址
{
while (*sor != '\0')//决定循环条件
{
*dest = *sor;//赋值
dest++;//指针跳过一个字节
sor++;
}
*dest = *sor;拷贝'\0'
}
int main()
{
char arr1[] = "xxxxxxxxx";
char arr2[] = "hello";
my_strcpy(arr1,arr2);
printf("%s", arr1);
return 0;
}