//String concatenation without using string function
//www.lernc.blogspot.com
#include
#include
main()
{
int i,l;
char a[15],b[30];
clrscr();
i=0;
printf("\n Given first string \n");
scanf("%s",a);
printf("Given second string \n");
printf("www.lernc.blogspot.com");
scanf("%s",b)
l=strlen(b);
while(a[i]!='\0')
{
b[l+i]=a[i];
i++;
}
b[l+i]='\0';
printf("\n Concatenated string is %s",b);
}
vry useful
ReplyDeleteusefull
ReplyDeleteby mohan.s
very useful thk u
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeletecan you make function like strlen with use of USER DEFINE FUNCTION?
ReplyDelete