diff options
| author | sinanmohd <pcmsinan@gmail.com> | 2022-06-18 09:50:18 +0530 |
|---|---|---|
| committer | sinanmohd <pcmsinan@gmail.com> | 2022-06-18 09:50:18 +0530 |
| commit | b5a845047dcad4512407ba7ee39779093cf38fc2 (patch) | |
| tree | b40424eb0eec157ce881d46a60e372f8b16383bf | |
| parent | ba3e350d9794cbd39c57a2ad74ea346e8a197401 (diff) | |
5.3
| -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; +} |
