From b5a845047dcad4512407ba7ee39779093cf38fc2 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 18 Jun 2022 09:50:18 +0530 Subject: 5.3 --- 5.3.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 5.3.c (limited to '5.3.c') diff --git a/5.3.c b/5.3.c new file mode 100644 index 0000000..940e2fa --- /dev/null +++ b/5.3.c @@ -0,0 +1,25 @@ +#include + +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; +} -- cgit v1.2.3