1 2 3 4 5 6 7 8 9 10 11
#include <string.h> void *memcpy(void *__restrict s1, const void *__restrict s2, size_t n) { char *tmp = s1; const char *s = s2; while (n--) *tmp++ = *s++; return s1; }