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
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What are the functions to open and close file in c language?
Give basis knowledge of web designing ...
Do you know null pointer?
What does typedef struct mean?
Explain what are multibyte characters?
Write a program to generate random numbers in c?
What are formal parameters?
Apart from dennis ritchie who the other person who contributed in design of c language.
Explain the use of 'auto' keyword
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?
Explain what is the benefit of using #define to declare a constant?
What will be the outcome of the following conditional statement if the value of variable s is 10?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Can i use “int” data type to store the value 32768? Why?