CJCoding With Joseph
← Back to Question List
C Code Walkthrough #22

Switch Fall-Through Without Break

mediumControl Flow

📄 Code

Read carefully — what does this print?
1#include <stdio.h>
2int main() {
3 int x = 2;
4 switch (x) {
5 case 1: printf("one ");
6 case 2: printf("two ");
7 case 3: printf("three ");
8 case 4: printf("four\n"); break;
9 case 5: printf("five\n");
10 }
11 return 0;
12}

🎯 Your Answer