fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. auto i = ntohl(10);
  8. printf("%x\n", i);
  9.  
  10. i = ntohl(22);
  11. printf("%x\n", i);
  12.  
  13. i = ntohl(0x16);
  14. printf("%x\n", i);
  15.  
  16. i = ntohl(0x22);
  17. printf("%x\n", i);
  18.  
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
a000000
16000000
16000000
22000000