This program contains some error due to current output of this program is
Two
Three
Which is wrong. Correct output is
Two
So, find out the error.
Click here to open this program in Turbo C++
/*******************************************************
Statement - Switch case (Resolve Error)
Programmer - Vineet Choudhary
Written For - http://developerinsider.co
*******************************************************/
#include <stdio.h>
#include <conio.h>
void main()
{
int x = 2;
clrscr();
switch(x) {
case 2:
printf("Two\n");
case 3:
printf("Three\n");
}
getch();
}
/*Correct Output
----------------
Two
*/