C++ · C++ If-Else, Switch and Loops
Question 1 of 5
What does this switch print?
int cmd = 2;
switch (cmd) {
case 1: cout << "A";
case 2: cout << "B";
case 3: cout << "C"; break;
default: cout << "D";
}Tip: press 1-4 to answer, Enter to continue. Finish the quiz to bank your XP.