write a program to remove duplicate from an ordered char array? in c

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

2004


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1646


What are the basic data types associated with c?

820


Is multithreading possible in c?

572


What is the purpose of type declarations?

683






Write a C program to count the number of email on text

1422


What is pointer & why it is used?

607


What are structure types in C?

677


What is logical error?

605


What are the characteristics of arrays in c?

616


Why main is not a keyword in c?

652


What are the 5 types of organizational structures?

554


Write a program to print factorial of given number using recursion?

607


What are 3 types of structures?

596


Which is better malloc or calloc?

656