Answer Posted / prakashdasari
char *str1,*str2,*res;
while(*str1!=NULL)
str++;
while(*str2!=NULL)
{
*str1 == *str2;
str1++;
str2++;
}
*str1 = '\0';
//so total string is in one string ie str1 itself;
//now i will remove duplicates from entire string
for(i=0;str[i]!=NULL;i++)
{
for(j=0;str[j]!=NULL;j++)
{
if(str[i]==str[j])
{
flag = 1;break;
}
else flag = 0;
}
if(flag == 0)
{
*res = str[i];
res++;
}
*res = '\0';
}
now resultant string (res) is union of two character
arrays....
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is variable in c example?
What is a pointer value and address in c?
What is conio h in c?
What is an auto variable in c?
How are pointers declared in c?
What is null in c?
what are enumerations in C
Why void is used in c?
Hai what is the different types of versions and their differences
What are shell structures used for?
Write a program to print factorial of given number using recursion?
What is the use of linkage in c language?
What is the total generic pointer type?
What is a structural principle?
How to write c functions that modify head pointer of a linked list?