fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. cout << ntohs(60946) << endl;
  8. cout << htons(60946) << endl;
  9. cout << ntohs(6443) << endl;
  10. cout << htons(6443) << endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
4846
4846
11033
11033