C program to Concatenate two Strings without using Strcat function
C program to Concatenate two Strings without using Strcat function
Source Code-#include<stdio.h>
int main()
{
char a[100],b[100];
int length=0;
int i,j;
printf("Enter the first string ");
gets(a);
printf("Enter the second string ");
gets(b);
for(i=0;a[i]!=;i++)
{
length=length+1;
}
for(i=length,j=0;a[j]!=;i++,j++)
{
a[i]=b[j];
}
printf("The new string is:");
puts(a);
return 0;
}
Output-
Available link for download