If switch contain another switch inside it then it is said as the Nested switch.
Syntax-
switch(var)
{
case :
switch(var2)
{
}
}
program-
#include< stdio.h>
int main()
{
int a=3;
char b='a';
switch(a)
{
case 1:
printf("case 1 is execute\n");
break;
case 2:
printf("case 2 is execute\n");
break;
case 3:
printf("case 3 is execute\n");
switch(b)
{
case 'a':
printf("Nested Switch");
}
}
}
case 3 is execute
Nested Switch