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
Is c procedural or object oriented?
When should structures be passed by values or by references?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What are the advantages of using new operator as compared to the function malloc ()?
Do you know null pointer?
Why c language is called c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
What does 3 mean in texting?
How can I do serial ("comm") port I/O?
What are the data types present in c?
C language questions for civil engineering
Can you subtract pointers from each other? Why would you?
What is the difference between text files and binary files?