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 |
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?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
can u give me the good and very optimised code for a car racing game?
write a programme to convert temperature from farenheit to celcius?
wats the diference btwen constant pointer and pointer to a constant.pls give examples.
What is a memory leak? How to avoid it?
2. Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.
Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
Do you know what is the purpose of 'extern' keyword in a function declaration?
what is the difference between #include<stdio.h> and #include"stdio.h" ?
show how link list can be used to repersent the following polynomial i) 5x+2
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?