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
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Explain the term printf() and scanf() used in c language?
diff between exptected result and requirement?
How can I read data from data files with particular formats?
What is use of bit field?
Why do we use int main?
Is using exit() the same as using return?
What is array in C
How are portions of a program disabled in demo versions?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What does & mean in scanf?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
the question is that what you have been doing all these periods (one year gap)
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)