Answer
volatile ensures visibility of variable changes.
Prevents instruction reordering for that variable.
Does not guarantee atomicity for compound operations.
Prevents instruction reordering for that variable.
Does not guarantee atomicity for compound operations.