aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--5.3.c25
1 files changed, 25 insertions, 0 deletions
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 <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;
+}