title: Difference between virtual address and physical address?
body: <p>Kindly explain the difference between the virtual and physical addresses based on the following example. Please explain which address is specifically used here and how to use the other address in the same place.
  Also, how can the two always be distinguished.</p>
  
  <p>code:</p>
  
  <pre><code>if(fork()==0)
   {
     a=a+5;
     printf("%d%d", a, &amp;a);
   }
  else
   {
     a=a-5;
     printf("%d%d", a, &amp;a);
   }
  </code></pre>
  
  <p>What address does <code>&amp;a</code> refer to in both the statements?</p>