write a program to remove duplicate from an ordered char array? in c
Answers were Sorted based on User's Feedback
Answer / shailesh
i m giving simlpe logic here.first sort the characters and
in a array. then check if a[i]==a[i+1],if yes, then move 1
place ahead i the arrray.
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / avizo
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum;
printf("enter the first value a:");
scanf("%d",&a);
printf("enter the second value b:");
scanf("%d",&b);
sum=a+b;
printf("sum=%d",sum);
getch();
}
| Is This Answer Correct ? | 0 Yes | 14 No |
What is the most efficient way to store flag values?
Explain why c is faster than c++?
While(1) { } when this loop get terminate is it a infinite loop?
How would you find a cycle in a linked list?
#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }
what is the flow of execution in cprogram? ex:printf();,scanf();
which operator is known as dummy operator in c?
How do you use a 'Local Block'?
What is the total generic pointer type?
what is the Output? int a=4 b=3; printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++); printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);