+ 10
code1 is the same as code2. what is about the simlicity of c/c++?
//code1 void strcpy(char *s, char *t) { while (*s++ = *t++) ; } //code2 void strcpy(char *s, char *t) { while (*t != '\0') { *s = *t; s = s + 1; t = t + 1; } *s = *t; }
3 Answers
+ 9
we can write a simplified code in c