strcat
Appends a copy of one string to the end of a second string (function or macro)
#include <string.h> char *strcat ( char *dst, const char *src);
strcat returns the value of dst.
The strcat function or macro appends a copy of the string pointed to by src (including the terminating NULL character) to the end of the string pointed to by dst. The first character of src overwrites the NULL character at the end of dst.
#include <string.h> #include <stdio.h> main () { char buffer[80]; strcpy (buffer, "Hello "); strcat (buffer, "world"); printf ("%s\n", buffer); }
produces the following:
Hello world