title: What makes a system little-endian or big-endian?
body: <p>I'm confused with the byte order of a system/cpu/program.<br>
  So I must ask some questions to make my mind clear.</p>
  
  <h3>Question 1</h3>
  
  <p>If I only use type <code>char</code> in my C++ program:</p>
  
  <pre><code>void main()
  {
      char c = 'A';
      char* s = "XYZ";    
  }
  </code></pre>
  
  <p>Then compile this program to a executable binary file called <code>a.out</code>.<br>
  Can <code>a.out</code> both run on little-endian and big-endian systems?</p>
  
  <h3>Question 2</h3>
  
  <p>If my Windows XP system is little-endian, can I install a big-endian Linux system in VMWare/VirtualBox? 
  What makes a system little-endian or big-endian?</p>
  
  <h3>Question 3</h3>
  
  <p>If I want to write a byte-order-independent C++ program, what do I need to take into account?</p>