String Concatenation

By Developgram - December 11, 2016

/*
Summary: Joins two strings
*/

#include <stdio.h>
#include <string.h>

int main()
{
 char a[100], b[100];

 printf("Enter the first string\n");
 gets(a);

 printf("Enter the second string\n");
 gets(b);

 strcat(a,b);

 printf("String obtained on concatenation is %s\n",a);

 return 0;
}

  • Share:

You Might Also Like

0 comments