title: Why does this function cast an int argument to a volatile pointer and immediately dereferences it?
body: <p>I just want to know what below function is doing</p>
  
  <pre><code>static int myfunc(int val)
  {
      return *(volatile int *)val;
  }
  </code></pre>