printing alnum and not just alpha

This commit is contained in:
Dan Buch 2011-09-18 10:41:35 -04:00
parent c9de7b1c13
commit f7f7f29a59

2
ex14.c
View File

@ -20,7 +20,7 @@ void print_letters(char arg[], int nchars)
for (i = 0; i < nchars; i++) { for (i = 0; i < nchars; i++) {
char ch = arg[i]; char ch = arg[i];
if(isalpha(ch) || isblank(ch)) { if(isalnum(ch) || isblank(ch)) {
printf("'%c' == %d ", ch, ch); printf("'%c' == %d ", ch, ch);
} }
} }