C programming string.h function - char *strcat(char *dest, const char *src)

https:‮‬//www.theitroad.com

The strcat function is defined in the string.h header file in C. It is used to concatenate two strings.

The function has the following prototype:

char *strcat(char *dest, const char *src);

The strcat function takes two arguments:

  1. dest - This is a pointer to the destination array, where the concatenated string is stored.

  2. src - This is a pointer to the source string that is to be concatenated with the destination array.

The function appends the string pointed to by src to the end of the string pointed to by dest. The resulting string is null-terminated.

The function returns a pointer to the destination string, i.e., the concatenated string.