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);
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

Follow CodeGalaxy

Mobile Beta

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