break;
The break is used to (1)terminate a case in the switch statement. (2)Force an immediate termination of a loop.
sample prog.
void main()
{
int a;
printf("1. Happy\n");
printf("2. Sad\n");
printf("Enter Your Choice..");
scanf("%d",a);
switch(a)
{
case 1: {
printf("You are happy.");
break;
}
case 2: {
printf("You are sad.");
break;
}
default:{
printf("Oops you error..");
break;
}
}
getch();
}