fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. unsigned int i = 481;
  8.  
  9. cout << (i & 0xFF) << endl;
  10. cout << ((i & 0xFF00) >> 8) << endl;
  11. cout << ((i & 0xFF0000) >> 16) << endl;
  12. cout << ((i & 0xFF000000) >> 24) << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
225
1
0
0