Answers for "switch format in C program"

C
0

switch format in C program

#include <stdio.h>
int main()
{
     int i=2;
     switch (i)
     {
          case 1:
             printf("Case1 ");
             break;
          case 2:
             printf("Case2 ");
             break;
          case 3:
             printf("Case3 ");
             break;
          case 4:
             printf("Case4 ");
             break;
          default:
             printf("Default ");
     }
     return 0;
}
Posted by: Guest on September-10-2021

Code answers related to "C"

Browse Popular Code Answers by Language