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
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
What is call by value in c?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Does free set pointer to null?
Is it better to use a macro or a function?
Is there sort function in c?
What is the difference between the expression “++a” and “a++”?
When the macros gets expanded?
Can you please explain the difference between strcpy() and memcpy() function?
How do I create a directory? How do I remove a directory (and its contents)?
What is the data segment that is followed by c?
Explain what is the general form of a c program?
Is c high or low level?
What is the difference between exit() and _exit() function?