title: How does a C++ compiler compile variable names?
body: <p>I understand I did not make myself clear. My doubt, I think, could be summed up in this:</p>
  
  <p>In an executable file(machine code) how are "variables" represented? Are they static memory addresses? Does the compiler gives each one a specific "name" (or just keeps the one you gave them)?</p>
  
  <p>Expressed in code:</p>
  
  <pre><code> int x=5;
   //Bunch of code
   cin&gt;&gt;y;
   cout&lt;&lt;x+1;
  </code></pre>
  
  <p>How does the program in each and every machine knows which address is going to hold the value 5, to hold the inputed value, to add 1 to the value it now holds and finally print that same value.</p>
  
  <p>--João</p>