Saring karakter yang tidak dapat dicetak

int ch, N = 0;
while ((ch = getchar()) != EOF) {
    if (isspace(ch))
        a[N++] = ' ';
    else if (isprint(ch))
        a[N++] = ch;
}
Ugliest Unicorn