Â
In this, we are going to see a program in which we will perform concatenation of two strings in C programming Language.
// WAP to perform concatenation of 2 strings
#include <stdio.h>
#include <string.h>
int main()
{
char str1[50], str2[50];
printf("Enter first String: ");
scanf("%s", str1);
printf("Enter Second String: ");
scanf("%s", str2);
strcat(str1, " ");
strcat(str1, str2);
printf("The Concatenation of two string is: %s", str1);
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP