printing alnum and not just alpha
This commit is contained in:
parent
c9de7b1c13
commit
f7f7f29a59
2
ex14.c
2
ex14.c
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user