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
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
How was c created?
What is the usage of the pointer in c?
What is return type in c?
What is the symbol indicated the c-preprocessor?
Is there a way to jump out of a function or functions?
In a header file whether functions are declared or defined?
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
can any one tel me wt is the question pattern for NIC exam
What are the different data types in C?
What are the advantages of using Unions?
Explain Basic concepts of C language?
What is meant by high-order and low-order bytes?
What is volatile variable how do you declare it?
Can an array be an Ivalue?