title: Scanf function in C with CodeBlocks IDE is buggy?
body: <p>I'm running some simple code in my CodeBlocks and I wonder why <code>scanf</code> function cannot work with shorts correctly!</p>
  
  <p>The code below is an example.  The code takes from the user three <code>int</code> numbers and then prints them again, that simple — but the values printed don't match the values entered.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      short x, y, z;
      printf("Please enter three integers! ");
      scanf("%d %d %d", &amp;x, &amp;y, &amp;z);
      printf("\n num1  =  %d  , num2 = %d  , num3  = %d ", x, y, z);
  
      return 0;
  }
  </code></pre>