switch format in c program

Solutions on MaxInterview for switch format in c program by the best coders in the world

showing results for - "switch format in c program"
Chiara
18 Aug 2019
1#include <stdio.h>
2int main()
3{
4     int i=2;
5     switch (i)
6     {
7          case 1:
8             printf("Case1 ");
9             break;
10          case 2:
11             printf("Case2 ");
12             break;
13          case 3:
14             printf("Case3 ");
15             break;
16          case 4:
17             printf("Case4 ");
18             break;
19          default:
20             printf("Default ");
21     }
22     return 0;
23}