switching on non-ascii value
This commit is contained in:
parent
80c1c5d5f3
commit
4bbd9c87a5
2
ex13.c
2
ex13.c
@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||||||
for(i = 0; argv[1][i] != '\0'; i++) {
|
for(i = 0; argv[1][i] != '\0'; i++) {
|
||||||
char letter = argv[1][i];
|
char letter = argv[1][i];
|
||||||
|
|
||||||
switch(letter) {
|
switch(127 + (int)letter) {
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'A':
|
case 'A':
|
||||||
printf("%d: 'A'\n", i);
|
printf("%d: 'A'\n", i);
|
||||||
|
Loading…
Reference in New Issue
Block a user