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 fflush() function?
application attempts to perform an operation?
main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf("%s",b);}
What is cohesion and coupling in c?
What is difference between union and structure in c?
What is calloc in c?
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +
How to set a variable in the environment list?
What is wrong with this code such that it doesnt produce the input reversed? #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char Space = ' '; char LineOfText; float count; LineOfText = getchar(); while ((LineOfText = getchar()) != '/n'); { count = strlen(LineOfText) - 1; while (count >= 0) { putchar(LineOfText[count]); count--; } } getchar(); return 0; }
What is c language & why it is used?
What are enums in c?
i=10,j=20 j=i,j?(i,j)?i:j:j print i,j