title: Find the exact address of variable Buf
body: <p>As reference, I'm using the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main (void) {
      char buf[100]; // ------&gt; How do I find the address in gdb?
  
      printf ("Buffer is at memory location: %08x\n", &amp;buf);
      strcpy (buf, "some random text");
      printf ("Text is [%s]\n", buf);
  
      return 0;
  }
  </code></pre>
  
  <p>How can I get <code>gdb</code> to show me the address of the <code>buf</code> variable?</p>