i've been working in c for a few months now, but am relatively new to the concept of arrays. the program that i am working on requires me to read in a string of up to 20 unique characters into an array, and then call a function to read the string, identify the unique characters, and print the characters out on a single line with no white spaces.
ex.
Input: Hello world!
Output: Helowrd!
that being said my question is how to read through the array (without using a string) and determine which characters are unique, and which have already been used.
i hope this makes sense, and i appreciate any help i can get.
below is how i would write the code if i had a string library available...
its just writing this without strings that is throwing me.
Code:#include <stdio.h> #include <string.h> int main(int argc, char** argp) { char Text[] = "Hello World"; size_t ix; for(ix=0; ix<strlen(Text); ix++) { char c = Text[ix]; putchar(c); } putchar('\n'); }