C Programming Code Examples C > Strings Code Examples C String function - strncat - It concatenates n characters of str2 to string str1 C String function - strncat - It concatenates n characters of str2 to string str1 It concatenates n characters of str2 to string str1. A terminator char ('\0') will always be appended at the end of the concatenated string. #include <stdio.h> #include <string.h> int main() { char s1[50] = "Happy Codings - "; char s2[50] = "C Programming Language Code Examples"; strncat(s1,s2, 3); printf("Concatenation using strncat: %s", s1); return 0; }