char* strcat(char *a, char *b) {. while (*a++);. a--;. while (*a++ = *b++);. return a;. } char *str_a = "a string";. char *str_b = "a long long long string" ... ... <看更多>
The problem is not on strcat , this is fgets which keep the ending '\n' at the end of the string. To remove this character I suggest you: ... ... <看更多>