title: What is the significance of the "volatile" key word with respect to Embedded Systems?
body: <p>I have been recently working on learning embedded systems programming on my own. I have observed a fairly high usage of the keyword <code>volatile</code> qualifier when declaring variables?</p>
  
  <p>What is the significance of <code>volatile</code> when declaring a variable in Embedded System programming?</p>
  
  <p>Basically when the should the key word be used. I did read something about compiler optimization and use of the keyword. Also something related to memory mapping registers.  </p>
  
  <p>For example, I read this <a href="https://stackoverflow.com/q/246127/1544337">StackOverflow post</a> but I didn't understand how it applied in an embedded environment.  More specifically, I don't understand when the key word should be used. I did read something about compiler optimization and use of the keyword. Also something related to memory mapping registers, but I don't understand when to use it.</p>