title: Pointers typecast
body: <p>I have the followig code and I want to know why I have the following output:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main() {
      double nValue = 5;
      void *pVoid = &amp;nValue;
  
      short *pInt = static_cast&lt;short*&gt;(pVoid);
  
      std::cout &lt;&lt; *pInt &lt;&lt; std::endl; 
      return 0;
  }
  </code></pre>
  
  <p>And it outputs me '0'. I want to know why is this happening. Thank you!</p>