Thursday, 13 October 2016

program to concate a string or word without using strcat() function


#include<stdio.h>
#include<string.h>
int main()
{
char a[10],b[10];
int i,j,len;
printf("enter first  the string");
gets(a);
printf("enter second the string");
gets(b);
len=strlen(a);
for(i=len,j=0;b[j]!='\0';i++,j++)
{
a[i]=b[j];
}
a[i]='\0';
printf("the concate string :");
puts(a);



}

No comments:

Post a Comment