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.

Follow CodeGalaxy

Mobile Beta

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