One question I was asked was this: Suppose you wrote some "C" code to read from a register inside a loop, and exit the loop only when a particular value was read. But your code isn't working: the loop continues to execute forever even when the correct "stop" value is placed into the register. What might be happening to cause this error?
Sigiloso
The answer they were looking for was that the code for the register read should use volatile variables, otherwise the compiler optimizer may determine that the repeated register reads are unnecessary and optimize them away. They also asked similar questions about static variables and their use.