aboutsummaryrefslogtreecommitdiff
path: root/5.3.c
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2022-06-18 09:50:18 +0530
committersinanmohd <pcmsinan@gmail.com>2022-06-18 09:50:18 +0530
commitb5a845047dcad4512407ba7ee39779093cf38fc2 (patch)
treeb40424eb0eec157ce881d46a60e372f8b16383bf /5.3.c
parentba3e350d9794cbd39c57a2ad74ea346e8a197401 (diff)
5.3
Diffstat (limited to '5.3.c')
-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;
+}