1 #include //printf 2 #include //ssert 3 #include //malloc 4 #include //strlen 5 6 char * sstrcpy(char * strdst, char * strsrc) 7 { 8 char *dst = strdst; 9 assert(strdst!=NULL && strsrc!=NULL); 10 while((*strdst++ = *strsrc++)!= '
1 #include //printf 2 #include //ssert 3 #include //malloc 4 #include //strlen 5 6 char * sstrcpy(char * strdst, char * strsrc) 7 { 8 char *dst = strdst; 9 assert(strdst!=NULL && strsrc!=NULL); 10 while((*strdst++ = *strsrc++)!= '