title: Strange behaviour when casting array char to array short
body: <p>I have 2 array: the first one is 8 unsigned char, and the second one is 4 unsigned short, for some algorithm compatibility issue i need to use the short array with the values of the char array, to do so i'm doing a loop</p>
  
  <pre><code>j = 0;
  for(i=0; i&lt;8; i+=2)
  {
      short_array[j] = *(unsigned short*) (char_array + i);
      j++;
  }
  </code></pre>
  
  <p>Everything work fine here, but in some previous attempt to build this up, i've tried the following (this is obviously not the correct answer) </p>
  
  <pre><code>j = 0;
  for(i=0; i&lt;8; i+=2)
  {
      short_array[j] = (unsigned short*) *(&amp;(char_array + i));
      j++;
  }
  </code></pre>
  
  <p>QUESTION:</p>
  
  <p>Assuming the following <code>char_array = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88}</code>
  When I do the first one short_array = {0x1122, 0x3344, 0x5566, 0x7788}
  But when I do the second one, short_array = {0x3344, 0x5566, 0x7788, ???} (where ??? is undefined since it is a value in the memory and may change).</p>
  
  <p>Can you explain why this i happening?</p>
  
  <p>PS: My compiler suite is C251 from Keil</p>