For Advertisements on this blog Contact Us at developgram@gmail.com or +91-9923438816

Simple Programming Tutorials For Beginners

Sunday, December 11, 2016

String Concatenation

/*
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;
}

No comments:

Post a Comment

SEARCH THIS BLOG