#include <stdio.h>
#include <string.h>
void getNonRepeatedCharacters(char *s) {
int ascii_count[256];
int i;
for (i = 0; *(s+i); i++)
if(*(s+i)!=' ')
ascii_count[(int)*(s+i)]++;
int n = i;
char new_s[26] = "";
for (int j = 0, i = 0; i < n; i++)
if (ascii_count[(int)*(s+i)] == 1)
new_s[j++] += s[i];
strcpy(s, new_s);
}
int main(int argc, char **argv)
{
char s[] = "c++ programming";
getNonRepeatedCharacters(s);
puts(s);
return 0;
}
/*
run:
cpoain
*/