title: Accessing specific memory locations in C
body: <p>In assembly language we have instructions like:</p>
  
  <pre><code>movl ax, [1000]
  </code></pre>
  
  <p>This allows us to access specific memory locations.</p>
  
  <p>But in C can we do something similar to this?</p>
  
  <p>I know inline assembly code using <code>asm()</code> will allow you to do this,
  but I would like to know about some C specific technique to achieve this.</p>
  
  <p>I tried the following code and got segmentation error:</p>
  
  <pre><code>int *ptr=0xFE1DB124;
  *ptr;
  </code></pre>
  
  <p>This again was confusing as the memory location was identified by the code given below:</p>
  
  <pre><code>int var;
  printf("\nThe Address is %x",&amp;var);
  </code></pre>
  
  <p>So the memory location is available, but I am still getting a segmentation fault.</p>
  
  <p>Why?</p>