0
7.9kviews
Explain switch case and if-else ladder with example.
1 Answer
0
456views

Switch Case:

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case.

Example:

Program:

// Following is a simple program to demonstrate syntax of switch.

#include …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.