How can we be sure that array elements are characters?
They can be big number, strings or anything.

On Fri, Jun 3, 2011 at 5:23 PM, Naveen Agrawal <[email protected]> wrote:

> C implementation:
>
>
> #include <stdio.h>
>
> int main()
> {
> char arr[100]="ash ;alsdfasf jahfjkjfhsakfjha";
>  int i;
>  int table[256] = {0};
>  int a;
> for(i = 0; i<=10; i++)
> {
>  // 'a ' store the ASCII value of arr[i]
> a = arr[i];
> if (table[a] == 0)
>  {
> table[a] = 1;
> printf("%c", arr[i]);
>  }
> }
>  printf("/n");
>
> }
>
>
>
>  --
> 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.
>



-- 
Cheers
Naveen Kumar

-- 
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