title: Data transfer across big and small Endian machines
body: <p>Assuming there are 3 strings like "cat", "bat, "rat". I need to combine them into one string and send them to another computer of different Endianess through socket programming.</p>
  
  <p>So, if the other machine is big endian, I'll pack the strings as:<br>
  <code>memcpy (base, "cat", 3)</code><br>
  <code>memcpy (base+3, "bat", 3)</code><br>
  <code>memcpy (base+6, "rat", 3)</code>  </p>
  
  <p>If the other machine is little endian, I'll pack the strings as:<br>
  <code>memcpy (base, "rat", 3)</code><br>
  <code>memcpy (base+3, "bat", 3)</code><br>
  <code>memcpy (base+6, "cat", 3)</code></p>
  
  <p><em><strong>Is my method correct?</em></strong></p>
  
  <p><em><strong>Secondly, will they be actually received on the other machine in a reverse order? I mean when the other machine's software  will start extracting strings from the "base" string, will it actually be in the reverse order - like rat, bat, cat?</em></strong></p>