title: How can i reverse the order of hex in c++
body: <p>To start with, I have a <code>char array</code> that store data   </p>
  
  <pre><code>unsigned char dat[3];
  
  memset(dat, 0, sizeof(dat));                    
  memcpy(dat, &amp;no, 2);
  </code></pre>
  
  <p>when I inspect dat, it contain a hex of 0xfd 0x01 
  as the value of no is 509, the hex should be 0x01 0xfd</p>
  
  <p>I'm wondering should I be concern of the order of the hexadecimal,
  should I change the order. Many thanks</p>