Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <endian.h>
  3. #include <stdint.h>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. uint32_t bytes = 0x00;
  8. char *oneByte = (char *)&bytes;
  9. *oneByte = 0x0F;
  10.  
  11. bytes = be32toh(bytes);
  12. bytes >>= 3 * 8;
  13. printf("%d\n", bytes);
  14.  
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement