Can You please explain this bit manipualtion

On Fri, Aug 5, 2011 at 10:31 PM, hary rathor <[email protected]> wrote:

> #include<string.h>
> int main ()
> {
> char str[]="hello world";
> int i,j=0,checker=0;
>
> for(i=0;i<strlen(str);i++)
> {
>     int  val=str[i]-'a';
>    if ((checker&(1<<val))<=0)
>    str[j++]=str[i];
>    checker|=(1<<val);
> }
>
> str[j]='\0';
>
> printf("%s",str);
> return 0;
>
> }
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to