fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. // cout << ntohs(0x8) << endl;
  8. printf("EtherType: 0x%04X\n", ntohs(0x8));
  9.  
  10. return 0;
  11. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
EtherType: 0x0800