/***************************************** * File: badswitch.c * Date: 10/02/2002 * Author: Kevin Atkinson (TA) * * Example of the improper use of the switch statement as given in the * first discussion session. Try it out for your self and see what * happens. * ****************************************/ #include int main() { int i; scanf("%d", &i); switch (i) { case 1: printf("one\n"); case 2: printf("two\n"); case 3: printf("three\n"); default: printf("num\n"); } return 0; }