Information

Author(s) Mathieu Xhonneux & Cyril Pletinckx
Deadline Καμία προθεσμία
Submission limit No limitation
Category tags level2, s2, category_string

Ετικετές

Συνδεθείτε

[S2] strcat

La libraire string(3) implémente un grand nombre de fonctions de manipulation des strings qui vous seront utiles lors de différents projets de programmation. Pour cette tâche, nous vous demandons de réimplémenter la fonction strcat(3). Don't hesitate to consult its man page.


Write the body of the function strcat which concatenates the strings dest and src in the dest pointer ! As the documentation says, you have to overwrite the '\0' character that terminates the dest string and then add a new '\0' at the end of the concatenated string. In this way, the src string will follow the dest string but the result will be considered as a unique entire string. You have to return the pointer to the resulting string dest.

char* strcat(char* dest, const char* src) {