Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

strcat - concatenate two strings

&pagelevel(4)&pagelevel

Syntax

#include <string.h>

char *strcat(char *s1, const char *s2);

Description strcat() appends a copy of the string s2 to the end of string s1 and returns a pointer to s1.

The terminating null byte (\0) at the end of string s1 is overwritten by the first byte of string
s2.
strcat() terminates the concatenated string with a null byte (\0).

Return val.

Notes

Pointer to the result string s1.

Strings terminated with the null byte (\0) are expected as arguments.

strcat() does not verify whether s1 has enough space to accommodate the result!

The behavior is undefined if memory areas overlap.

See also

strncat(), string.h.