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

Explain the bubble sort algorithm.

1005


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1023


How do I read the arrow keys? What about function keys?

1018


what is the syallabus of computer science students in group- 1?

2264


What is character set?

1118


There seem to be a few missing operators ..

1004


Which is better pointer or array?

974


What does a pointer variable always consist of?

1041


Are there any problems with performing mathematical operations on different variable types?

992


Explain null pointer.

1041


Why cant I open a file by its explicit path?

988


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1022


What is property type c?

1045


Why is this loop always executing once?

999


What does the characters “r” and “w” mean when writing programs that will make use of files?

1422