:
char *s = "abc";
s = "def";
. char *s - . char *s = "abc", , *s. s "def", , , , *s.
.. . , strcpy(3)/strncpy(3).
- , malloc(3)/strdup(3), .
, :
const char *str1 = "abc";
const char *str2 = "def";
char *s1 = malloc(strlen(str1)+1);
char *s2 = malloc(strlen(str2)+1);
s1 = s2;
s1 s2. , , s1 , s1 s2, , . , free(3), . free() , , .