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 |
Give the rules for variable declaration?
how can be easily placed in TCS.
Where are the auto variables stored?
Write a program in c to replace any vowel in a string with z?
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.
What do you understand by normalization of pointers?
Explain what is the difference between text files and binary files?
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?
What is the deal on sprintf_s return value?
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?
What does void main return?