自己实现内存拷贝函数memcpy

#include
#include
void *Memcpy(char *dst,char *src, size_t size)
{
assert(src&&dst);
if( (dst>src) && (dst {
src =https://www.it610.com/article/src+size-1;
dst = dst+size-1;
*src = https://www.it610.com/article/*dst;
}
}
int main ()
{
char arr[100]="abcdefghijk";
Memcpy(arr+1,arr,6);
printf("%s\n",arr);
return 0;
}

    推荐阅读