Given the following code:
enum Enum {
  a = 0, b = 3, c
};
Which of these ways will allow you to iterate over items of the Enum type and execute a certain code fragment over each of them?
Explanation
enum is not intended to be iterated. The loop traversal will also have to handle items that are not part of the enumeration (for this example, values of 1 and 2).

Следи за CodeGalaxy

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

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