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

write a program to fined second smallest and largest element in a given series of elements (without sorting)

9 Answers   Yahoo,


hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a

1 Answers  


x=2,y=6,z=6 x=y==z; printf(%d",x)

13 Answers   Bharat, Cisco, HCL, TCS,


Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error

4 Answers   HCL,


main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }

2 Answers   CSC,


Write a pro-gramme to determine whether the number is even or odd?

1 Answers  


what is the use of pointers

6 Answers   Adobe, GrapeCity,


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

1 Answers  


Find if a number is power of two or not?

1 Answers  


What is c method?

1 Answers  


Write a program which returns the first non repetitive character in the string?

1 Answers   Expedia,


Categories