1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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; }