← Back to Question List
C++ Code Walkthrough #17
Switch with Fall-Through
📄 Code
Read carefully — what does this print?1#include <iostream>2using namespace std;34int main() {5 int day = 3;6 switch (day) {7 case 1:8 cout << "Mon" << endl;9 break;10 case 2:11 cout << "Tue" << endl;12 break;13 case 3:14 cout << "Wed" << endl;15 case 4:16 cout << "Thu" << endl;17 break;18 case 5:19 cout << "Fri" << endl;20 break;21 }22 return 0;23}