aboutsummaryrefslogtreecommitdiff
path: root/5.3.c
blob: 940e2fa2e709f58cfa45624b64a85c786c3b245f (plain) (blame)
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;
}