title: Same output for htonl() and ntohl() on an integer
body: <p>I ran the following program on little-endian [LE] machine [Linux, Intel processor]. I am unable to explain the 3 outputs in below code snippet. Since machine is LE, the value of <code>a</code> is stored as <code>0x78563412</code>. When printing, it is displaying its actual value. Since its an LE machine, I expect <code>ntohl()</code> to be a no-op and display <code>0x78563412</code>, which it is doing. However, I expect <code>0x12345678</code> for 2nd print statement containing <code>htonl()</code>. Can someone please help me understand why they are same?</p>
  
  <pre><code>int main() 
  {
      int a = 0x12345678; 
  
      printf("Original - 0x%x\n", (a)); 
      printf("Network - 0x%x\n", htonl(a)); 
      printf("Host - 0x%x\n", ntohl(a)); 
  
      return 0;
  }
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>Original - 0x12345678
  Network - 0x78563412
  Host - 0x78563412
  </code></pre>