title: Inject uint16_t value into uint8_t array using pointers?
body: <p>I am trying to insert a uint16_t value into a uint8_t array using pointers. I would think below would work, but haven't been able to do it. Any clues as to what the problem is? </p>
  
  <pre><code>uint8_t myarray[10];
  uint16_t value = 10000;
  uint16_t * myptr = (uint16_t *)(myarray+2);
  *myptr = value;
  </code></pre>
  
  <p>I know I can do it like so, but why doesn't above work? </p>
  
  <pre><code>uint8_t myarray[10];
  uint16_t value = 10000;
  uint8_t * myptr = (myarray+2);
  uint8_t * myptr2 =(myarray+3);
  *myptr = value&gt;&gt;8;
  *myptr2 =value;
  </code></pre>