Switch Case Statement

The switch case statement can be used when certain statement have to be executed based upon a particular case. It has the following syntax :

switch(value)
{
case (value 1):
{
Statement(s)
break;
}
case (value n):
{
Statement(s)
break;
}
default:
{
Statement(s)
}
}

No comments:

Post a Comment