Pointer to the destination null-terminated string where the content of `src` will be appended.
2nd Parameter Type : const char *
Pointer to read-only string
2nd Parameter
Pointer to the source null-terminated string to append to `dest`.
Read more about parameters of strcat in parameters section
The strcatfunction in C language Appends the source string to the destination string.
The strcat function appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the first character of source, and a new null-character is appended at the end of the new string formed by the concatenation of both in destination.
The strcatfunction takes 2
parameters:
•
char * `dest`: Pointer to the destination null-terminated string where the content of `src` will be appended.
•
const char * `src`: Pointer to the source null-terminated string to append to `dest`.
Appends the source string `src` to the destination string `dest`, overwriting the null terminator at the end of `dest` and adding a new null terminator. The destination string must have enough space to hold the resulting string. Returns a pointer to the destination string `dest`.
The strcat function return value :
Returns a pointer to the resulting string destination
Output
This example demonstrates basic usage of strcat to concatenate two strings.