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

what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1446


What are the functions to open and close file in c language?

723


Give basis knowledge of web designing ...

1569


Do you know null pointer?

600


What does typedef struct mean?

654






Explain what are multibyte characters?

621


Write a program to generate random numbers in c?

658


What are formal parameters?

652


Apart from dennis ritchie who the other person who contributed in design of c language.

801


Explain the use of 'auto' keyword

673


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

799


Explain what is the benefit of using #define to declare a constant?

604


What will be the outcome of the following conditional statement if the value of variable s is 10?

755


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

647


Can i use “int” data type to store the value 32768? Why?

751