/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>
#include <string.h>
#include <wctype.h>
#include <limits.h>

int main()
{
    const wchar_t *s = L"Sunset glow on the horizon";
    int frqs[65536] = { 0 };
    int len = wcslen(s);
    for (int i = 0; i < len; i++) {
        wchar_t c = towlower(s[i]);
        if (iswalpha(c)) {
            frqs[(unsigned)c] += 1;
        }
    }
    for (int i = 0; i < len; i++) {
        wchar_t c = towlower(s[i]);
        if (frqs[(unsigned)c] == 1) {
            printf("%c", c);
        }
    }
    printf("\n");
    return 0;
}
