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
Login in to like
Login in to comment