Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Concat two string with most overlapped substring has to
removeĀ  "abcd"+ "cdef" = "abcdef

Answer Posted / sham

char *strappend1(char *src,char *des)
{
char *tmp=src;
int f=0;
while(*des)
{
while(*src!='\0')
{
if(*src==*des)
{
f=0;
break;
}
else
f=1;
src++;
}
if(f==1)
{
*src++=*des;
*src='\0';
}
des++;
}
return tmp;
}
int main(int argc,char **argv)
{
char *src=argv[1],*des=argv[2];
char *str;
str=strappend1(src,des);
printf("%s",str);
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cohesion and coupling in c?

999


What is the scope of static variable in c?

965


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1120


How can a program be made to print the line number where an error occurs?

1051


What does %p mean c?

1026


What is union and structure?

1060


What is variable declaration and definition in c?

872


What is #pragma statements?

1065


When should structures be passed by values or by references?

1010


What is #include stdio h and #include conio h?

1063


Explain can you assign a different address to an array tag?

1021


What is the use of the function in c?

988


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2078


Why is c still so popular?

1018


What is a stream in c programming?

1102