#include <stdio.h>
char* strcpy(char* s1, const char* s2) {
// copy s2 to s1
char* p = s1;
for (p = s1; (*p++ = *s2++) != '\0'; )
;
return s1;
}
int main() {
char str1[32] = "";
char str2[32] = "c programming";
strcpy(str1, str2);
puts(str1);
return 0;
}
/*
run:
c programming
*/