Filter out any non-printable characters code example
Example: Filter out any non-printable characters
int ch, N = 0;
while ((ch = getchar()) != EOF) {
if (isspace(ch))
a[N++] = ' ';
else if (isprint(ch))
a[N++] = ch;
}
int ch, N = 0;
while ((ch = getchar()) != EOF) {
if (isspace(ch))
a[N++] = ' ';
else if (isprint(ch))
a[N++] = ch;
}