Which C ++ keyword should be inserted in place of the ellipsis so that the following code can theoretically exit the loop?
... int a = 10;
while (a);
Explanation
The volatile specifier explicitly tells the compiler that the value of this variable should always be read from memory each time this variable is accessed. Therefore, theoretically, another device can change the value of the memory area allocated for a to 0, which will lead to the exit from the loop. https://en.wikipedia.org/wiki/Volatile_variable

Слідкуй за CodeGalaxy

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

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