Write a program to add two strings in C Language - Program to concatenate two strings in C

 Program to add two strings in C Language 

#include <stdio.h>

#include <string.h>

int main()

{

   char s1[100], s2[100];

   printf("\nEnter the First Name = ");

   gets(s1);

   printf("\nEnter the Last Name = ");

   gets(s2);

   strcat(s1,s2);

   printf("\nYour Full Name is : %s\n",s1);

   return 0;

}

इस कोड को हमने CODEBLOCK पर बना कर run किया है

OUTPUT

Comments