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 / tarak

#include<stdio.h>
main()
{
char *a="abcd";
char *b="cdef";
char c[10];
int i=0;
while(*a != *b)
{
c[i] = *a++;
i++;
}
while(*b != '\0')
{
c[i]= *b++;
i++;
}
printf("%s\n",c);
}

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1859


How was c created?

1004


What is the usage of the pointer in c?

1066


What is return type in c?

1087


What is the symbol indicated the c-preprocessor?

1184


Is there a way to jump out of a function or functions?

1056


In a header file whether functions are declared or defined?

1096


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5416


can any one tel me wt is the question pattern for NIC exam

1928


What are the different data types in C?

1163


What are the advantages of using Unions?

1081


Explain Basic concepts of C language?

1098


What is meant by high-order and low-order bytes?

1011


What is volatile variable how do you declare it?

1051


Can an array be an Ivalue?

1068