Skip to content

Instantly share code, notes, and snippets.

@burning-croissant
Created May 15, 2018 13:26
Show Gist options
  • Save burning-croissant/edbadcd96d8d253d40a2e83f57abd1e5 to your computer and use it in GitHub Desktop.
Save burning-croissant/edbadcd96d8d253d40a2e83f57abd1e5 to your computer and use it in GitHub Desktop.
Volatile example
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