nested switch statements

  1. 語法
    switch(ch1) {
       case 'A': 
          printf("This A is part of outer switch" );
          switch(ch2) {
             case 'A':
                printf("This A is part of inner switch" );
                break;
             case 'B': /* case code */
          }
          break;
       case 'B': /* case code */
    }