strncat
strncat is a function in the C standard library used to concatenate a limited number of characters from one string (src) onto the end of another string (dest). It is declared in <string.h> in C and in <cstring> in C++.
Prototype: char *strncat(char *dest, const char *src, size_t n); It appends at most n characters from src
Usage considerations: The destination buffer must have enough space for the original contents of dest, plus
Return value: A pointer to dest.
Example: char s[20] = "Hello"; strncat(s, "World", 3); // s becomes "HelloWor"
Related notes: strncat is similar to strcat but with a length limit. In portable code that requires