Discuss Switch case or Switch statement

No comments

 Switch Case or Switch Statement :-  This is a multi dimensional conditional control statement there is a need in program to make choice among number of alternatives. For making this choice,we use the switch statement.

This can be Written as :-

switch (expression)
     {
            case constant-1:  block-1;
                                        break;
            case constant-2:  block-2;
                                        break; 
            ......................................
            .....................................
            case constant-n:  block-n;
                                        break;
            default:   
                                   default block;
      }
        statement- x;

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀