Mega Code Archive
Categories
/
C
/
Code Snippets
Append substring to string strncat
#include
#include
int main () { char str1[20]; char str2[20]; strcpy (str1,"rntsoft.com"); strcpy (str2,"Superman"); strncat (str1, str2, 6); puts (str1); return 0; }