The volatile keyword is used to represent variables that point to memory in other mapped devices. In such a case the value of the variable can be changed outside of a program. The compiler does not do additional optimizations to the code if there is volatile keyword.
What is the volatile keyword used for?
Category: Embedded Systems Interview Questions.