switching on non-ascii value

This commit is contained in:
Dan Buch 2011-09-13 22:51:00 -04:00
parent 80c1c5d5f3
commit 4bbd9c87a5

2
ex13.c
View File

@ -11,7 +11,7 @@ int main(int argc, char *argv[])
for(i = 0; argv[1][i] != '\0'; i++) {
char letter = argv[1][i];
switch(letter) {
switch(127 + (int)letter) {
case 'a':
case 'A':
printf("%d: 'A'\n", i);