write a program to remove duplicate from an ordered char array? in c

Answers were Sorted based on User's Feedback



write a program to remove duplicate from an ordered char array? in c..

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

write a program to remove duplicate from an ordered char array? in c..

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

Post New Answer

More C Interview Questions

What is fflush() function?

0 Answers  


application attempts to perform an operation?

0 Answers  


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);}

3 Answers  


What is cohesion and coupling in c?

0 Answers  


What is difference between union and structure in c?

0 Answers  






What is calloc in c?

0 Answers  


Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 Answers  


How to set a variable in the environment list?

1 Answers  


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; }

2 Answers  


What is c language & why it is used?

0 Answers  


What are enums in c?

0 Answers  


i=10,j=20 j=i,j?(i,j)?i:j:j print i,j

1 Answers   CSC,


Categories