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

int main() {
    using std::cout;

    enum States
    {
        opened,
        closed,
        parked = 8,
        crashed,
        dumped
    };

    States state = dumped;
    cout << dumped << std::endl;
    return 0;    
}
Explanation
Enum counter can be modified manually and each subsequent element will be incremented by 1 starting from given value.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести