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
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
Differentiate between calloc and malloc.
What are the 4 types of programming language?
Can 'this' pointer by used in the constructor?
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.
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
When should we use pointers in a c program?
Explain what is the best way to comment out a section of code that contains comments?
What is meant by recursion?
What is meant by gets in c?
How can I manipulate strings of multibyte characters?
What is the advantage of an array over individual variables?
How is pointer initialized in c?
What is methods in c?
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.