Concat two string with most overlapped substring has to
remove  "abcd"+ "cdef" = "abcdef

Answer Posted / om

@Ashwin Kumar
According to your program....
char *a="abcdcdcd";
char *b="cdef";

output is "abcdef"..//which is wrong.....it should be abcdcdef

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

664


Differentiate between calloc and malloc.

762


What are the 4 types of programming language?

589


Can 'this' pointer by used in the constructor?

617


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

1771






main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

728


When should we use pointers in a c program?

638


Explain what is the best way to comment out a section of code that contains comments?

725


What is meant by recursion?

636


What is meant by gets in c?

613


How can I manipulate strings of multibyte characters?

643


What is the advantage of an array over individual variables?

747


How is pointer initialized in c?

591


What is methods in c?

649


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

1587