C Program to Concatenate Two Strings Using strcat()

Concatenating two strings in C program involves combining them to create a single string. Here’s a simple C program that concatenates two strings.

Program :

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char input1[80];
char input2[80];
printf(“Enter the first string: “);
gets(input1);
printf(“Enter the second string: “);
gets(input2);
strcat(input1,input2);
puts(input1);
}

Output :

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Basket
Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare
Verified by MonsterInsights