I'm testing the function void strcpy(char *s, char *t) I've just learned in K&R (page 106) but my codes (shown below) don't seem to work. Please help. Thanks a lot.
PS: I've changed the name of the function to strcpy1 to differentiate it from the built-in one in the standard library.
#include<stdio.h>
void strcpy1(char *s, char *t);
int main() {
char *m = "Love is beautiful";
char *n;
strcpy1(n, m);
printf("%s", n);
}
void strcpy1(char *s, char *t)
{
while (*s++ = *t++)
;
}