{ A destination to learn coding }

Conditional Statements

Nested Switch statement

C allows you to nest switch in switch statements.

Nested Switch
#include<stdio.h>
int main()
{
  char a='A', b='B';

  switch(a)
  {
    case 'A':
     printf("The letter is A\n");

     switch(b)
     {
      case 'B':
      printf("The letter is B\n");
      break;
     }

     break;

    default:
     printf("Hii");
  }
return 0;
}
C Codes