What will be printed out as a result of the following code's execution?
#include <iostream>

void f(int x) {
    switch(x) {
        case 1:std::cout << 1;
        case default:std::cout << "Default";
        case 2:std::cout << 2;
    }
}

int main() {
    f(1);
    f(2);
    f(3);
    return 0;
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes