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
Зареєструйся Зараз
або Підпишись на майбутні тести