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 the difference between array and pointer in c?

0 Answers  


void main() { int a=1; while(a++<=1) while(a++<=2); }

4 Answers   HCL,


Write a program for finding factorial of a number.

0 Answers   Tech Mahindra,


Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child

10 Answers   IBM, Infosys,


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

0 Answers   TCS,






Write a C program to get the desired output. 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 . . . 1 n..............n 1 Note: n is a positive integer entered by the user.

4 Answers  


What are valid signatures for the Main function?

0 Answers  


Which is an example of a structural homology?

0 Answers  


multiple of 9 without useing +,* oprator

3 Answers  


Explain the difference between structs and unions in c?

0 Answers  


2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value

3 Answers   Accenture,


write a c program for greatest of three numbers without using if statment

4 Answers   IBM,


Categories