What will be displayed on the console as a result of the program?
#include <iostream>
using namespace std;

int main() {
    int i = 0;

    switch(0) {
        for( ; i < 3 ; i++) {
            cout << i; case 0:;
        };
    };

    return 0;
}
Explanation
In a switch statement case is announcing the usual mark/label, that is not necessarily be located at the beginning of the expression. See also Duff's device.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты