title: How are variables on the stack accessed?
body: <p>Suppose we have these local variables:</p>
  
  <pre><code>int a = 0;
  int b = 1;
  int c = 2;
  int d = 3;
  </code></pre>
  
  <p>As far as I know, these will be allocated on the system stack, like this:</p>
  
  <pre><code>|   |
  | 3 | d
  | 2 | c
  | 1 | b
  |_0_| a
  </code></pre>
  
  <p>Does this mean that in order to get the value of a, the values of d, c and b must first be popped out of the stack? If so, where do these values go? Does this mean that accessing more recently declared variables will be faster? Or am I missing something (which I suspect is the case), and the whole thing works in some other way?</p>
  
  <p><strong>EDIT:</strong> thanks, guys!</p>