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 does 3 mean in texting?
What is a void * in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Explain what is wrong with this statement? Myname = ?robin?;
What is the scope of static variable in c?
How to delete a node from linked list w/o using collectons?
Is Exception handling possible in c language?
Why c language is called c?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Explain how can I avoid the abort, retry, fail messages?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
How can I trap or ignore keyboard interrupts like control-c?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none