Listing 2

char ch;
 ...
switch( ch ) {
  case 'a' ... 'z':
    printf("lowercase\n"); break;
  case '0' ... '9':
    printf("number\n"); break;
}