title: Stack: low memory vs high memory address actual location?
body: <p>I've been reading about stack and memory address location in a few tutorials and wondering why their reference of low and high memory location are different?</p>
  
  <p>This is confusing.</p>
  
  <p>E.g. </p>
  
  <p><strong>Low Memory Address located at the top while High Memory Address at the bottom</strong>
  <a href="https://i.stack.imgur.com/Z5cSh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z5cSh.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Low Memory Address located at the bottom while High Memory Address at the top</strong>
  <a href="https://i.stack.imgur.com/vnJIy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vnJIy.png" alt="enter image description here"></a></p>
  
  <p>When I try it with a simple <code>C</code> program, it seems like Low Memory Address is located on the top. From <code>bfbf7498 &gt; bfbf749c &gt; bfbf74a0 &gt; bfbf74a4 &gt; bfbf74a8 &gt; bfbf74ac</code></p>
  
  <pre><code>user@linux:~$ cat &gt; stack.c                     
  #include &lt;stdio.h&gt;
  
  int main()
  {
          int A = 3;
          int B = 5;
          int C = 8;
          int D = 10;
          int E = 11;
          int F;
          F = B + D;
  
          printf("+-----------+-----+-----+-----+\n");
          printf("| Address   | Var | Dec | Hex |\n");
          printf("|-----------+-----+-----+-----|\n");
          printf("| %x  | F         | %d  | %X   |\n",&amp;F,F,F);
          printf("| %x  | E         | %d  | %X   |\n",&amp;E,E,E);
          printf("| %x  | D         | %d  | %X   |\n",&amp;D,D,D);
          printf("| %x  | C         | 0%d  | %X   |\n",&amp;C,C,C);
          printf("| %x  | B         | 0%d  | %X   |\n",&amp;B,B,B);
          printf("| %x  | A         | 0%d  | %X   |\n",&amp;A,A,A);
          printf("+-----------+-----+-----+-----+\n");
  }
  user@linux:~$ 
  
  user@linux:~$ gcc -g stack.c -o stack ; ./stack 
  +-----------+-----+-----+-----+
  | Address   | Var | Dec | Hex |
  |-----------+-----+-----+-----|
  | bfbf7498  | F   | 15  | F   |
  | bfbf749c  | E   | 11  | B   |
  | bfbf74a0  | D   | 10  | A   |
  | bfbf74a4  | C   | 08  | 8   |
  | bfbf74a8  | B   | 05  | 5   |
  | bfbf74ac  | A   | 03  | 3   |
  +-----------+-----+-----+-----+
  user@linux:~$ 
  </code></pre>