C library function strcat()




C library function strcat()

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char str1[] = "This is ", str2[] = "tutorialsroot.com";

    //concatenates str1 and str2 and resultant string is stored in str1.
    strcat(str1,str2);

    puts(str1);    
    puts(str2); 

    return 0;
}

Output

This is tutorialsroot.com
tutorialsroot.com