C programming string.h function - char *strncat(char *dest, const char *src, size_t n)

The strncat function is used to concatenate a string of at most n characters from the source string to the end of the destination string. It appends the null-terminated string pointed to by src to the end of the null-terminated string pointed to by dest, overwriting the null character at the end of dest, and then adds a terminating null character. The n argument specifies the maximum number of characters to be appended from the source string.

The function signature is:

refer ‮i:ot‬giftidea.com
char *strncat(char *dest, const char *src, size_t n);

Here, dest is a pointer to the destination string and src is a pointer to the source string. n is the maximum number of characters to be appended.

The return value is a pointer to the destination string dest.