+ 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; }

29th Dec 2017, 4:51 PM
L Boudhar
L Boudhar - avatar
3 Answers
+ 9
we can write a simplified code in c
29th Dec 2017, 6:26 PM
L Boudhar
L Boudhar - avatar