fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3. #include <cstdint>
  4. #include <cstdio>
  5. using namespace std;
  6.  
  7. int main() {
  8. int32_t val = 0;
  9. int32_t res = 0;
  10. val = 1158015168;
  11. res = ntohl(val);
  12. printf("%d %d\n", val, res);
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
1158015168 -1058536123