EmbLogic's Blog

c program to concatinate two string without using

#include
#include
int main()
{
char a[20]={0},b[10]={0};
int i,j=0;
printf(“Enter name1:\n”);
scanf(“%s”,a);
printf(“Enter second name:\n”);
scanf(“%s”,b);
for(i=0;i<20;i++)
{
if(a[i]=='')
{
a[i]=b[j];
j++;

}
}
printf("Concatination is: %s\n",a);

return 0;

}

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>