Wednesday 9 July 2014

Program for Switch case with two cases

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
i=2;
switch(i)
{
case 1:
{
printf("case 1");
}
case 2:
{
printf("case 2");
break;
}
default:
{
printf("default");
}
getch();
}
}

No comments:

Post a Comment