Switch Statement

The Switch statement can be used for executing a group of statements based on a value. Syntax

Program

Rule1: Specifying the argument to switch is mandatory and it should be of either byte, short, int or char only. Rule2: Specifying the flower to switch statement is mandatory. Rule3: Specifying the case and default statement in switch […]

Continue reading