Suppose I do like this to copy the string.
char str[] = \"\"; char *str2 = \"abc\"; strcpy(str, str2); printf(\"%s\", str); // \"abc\" printf(\"%d\", strlen(str
It actually gives you undefined behavior, but your program doesn't have to fail because of that. That's how undefined behavior works.