Write a C program to remove the repeated characters in the
entered expression or in entered characters(i.e) removing
duplicates

Answer Posted / nallavelli srinivas

MAIN()
{ int lsu=0;
char name[50];
pf("enter the string");
sf("%S",name);

printf(name[0]);
while(name[i]!='\0')
{
if(name[i]!=lsu){pf(name[i]);
lsu=name[i];
}
}
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In a switch statement, what will happen if a break statement is omitted?

598


How would you obtain the current time and difference between two times?

720


Explain how do you determine whether to use a stream function or a low-level function?

618


Tell me what is the purpose of 'register' keyword in c language?

614


How can you tell whether two strings are the same?

821






Why do we use int main?

602


Do you have any idea about the use of "auto" keyword?

660


What is the use of static variable in c?

593


What is the use of parallelize in spark?

570


Why do we need arrays in c?

577


What does dm mean sexually?

806


Explain void pointer?

586


What is difference between arrays and pointers?

575


Can an array be an Ivalue?

657


What are 3 types of structures?

590