Uber interview question

What does the volatile keyword do?

Interview Answer

Anonymous

27 Sept 2018

It forces the compiler to not optimize a variable and to always read it from memory.