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

Give the rules for variable declaration?

0 Answers  


how can be easily placed in TCS.

0 Answers   TCS,


Where are the auto variables stored?

0 Answers   TISL,


Write a program in c to replace any vowel in a string with z?

0 Answers   IBS,


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

0 Answers   TCS,


What do you understand by normalization of pointers?

0 Answers  


Explain what is the difference between text files and binary files?

0 Answers  


void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?

7 Answers  


What is the deal on sprintf_s return value?

0 Answers  


write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview

2 Answers   Satyam, UNIS, Wipro,


What are variables and it what way is it different from constants?

0 Answers  


What does void main return?

0 Answers  


Categories