Page 32 - PowerPoint Presentation
P. 32

Switch Statement











                                     switch(expression) {




                                        case case_label_1: statement(s); break;
                                        case case_label_2: statement(s); break;

                                        case case_label_3: statement(s); break;

                                        . . . .
                                        . . . .

                                        case case_label_n: statement(s); break;

                                        default: default_statement (s); break;



                                     }
   27   28   29   30   31   32   33   34   35   36