diff options
-rw-r--r-- | 5.3.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#include <stdio.h> + +char *strcat(char to[], char from[]); + +int +main(void) +{ + char str[10] = "glow"; + + printf("%s\n", strcat(str, " bois")); + + return 0; +} + +char +*strcat(char to[], char from[]) +{ + while(*to++) + ; + + while ((*to++ = *from++)) + ; + + return to; +} |