fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. auto i = ntohl(0x9b000000);
  8. cout << i << endl;
  9.  
  10. auto j = htons(i);
  11. cout << j << endl;
  12.  
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
155
39680