{{keywords>wiki library source code example reference}} ====== strcat ====== #include char *strcat(char *str1, const char *str2); ===== description of strcat ===== The strcat function concatenates two strings.\\ str1 = target string to be added to source\\ str2 = source string to copied, including '\ 0' at the end of destination. \\ null byte of destination will be overwritten.\\ ===== strcat C Sourcecode Example ===== /* * strcat example code * http://code-reference.com/c/string.h/strcat */ #include #include int main ( void ) { char str[42]="strcpy "; strcat (str,"c example "); printf("%s\n", str); strcat(str, "for c"); printf("%s\n", str); return 0; } ==== output of strcat c example ==== user@host:~$ ./strcat strcpy c example strcpy c example for c