title: How many bytes in " signed short " data type in c ?
body: <p>Firstly,I tried <strong><em>sizeof</em></strong>(signed short), the output was 2 bytes.</p>
  
  <p><strong>BUT</strong>
  When I tried to check by the hex representation of the signed short, it turns out to be 4 bytes :</p>
  
  <pre><code>#include &lt;stdio.h&gt;
   void main(){
   signed short  test  ;
   test=-17; /* any number */
   printf(" -17 when viewed as signed short Hexa is \t %x\n ", test);
   }`
  </code></pre>
  
  <p>The output : </p>
  
  <pre><code>-17 when viewed as signed short Hexa is      ffffffef
  </code></pre>
  
  <p>ffffffef means 32 bits not 16 bits !</p>