fork(1) download
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <stdint.h>
  4. #include <inttypes.h>
  5.  
  6. int main()
  7. {
  8. char s[9]={'\x00','\x00','\x00','\x6a','\x46','\xd2','\xdf','\x44'};
  9. uint64_t i = htobe64(*(uint64_t*)s );
  10. printf("%" PRIx64 "\n", i );
  11. printf("%" PRIu64 "\n", i );
  12. return 0;
  13. }
  14.  
  15.  
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
6a46d2df44
456454758212