-
-
Save burning-croissant/edbadcd96d8d253d40a2e83f57abd1e5 to your computer and use it in GitHub Desktop.
Volatile example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(){ | |
volatile int impenetrable_variable=10; | |
for(int i=1; i<=3; i++){ | |
// Every time the value is changed, it really changes the value in the main memory. | |
impenetrable_variable += i; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment