fork(1) download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <inttypes.h>
  4.  
  5. int main(void) {
  6. // your code goes here
  7. int32_t a=-1;
  8. int32_t b=-1;
  9. int64_t c = (int64_t)a * b;
  10. printf("signed: 0x%016"PRIx64"\n", (uint64_t)c);
  11.  
  12. uint32_t d=(uint32_t)-1;
  13. uint32_t e=(uint32_t)-1;
  14. uint64_t f = (uint64_t)d * e;
  15. printf("unsigned: 0x%016"PRIx64"\n", f);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
signed: 0x0000000000000001
unsigned: 0xfffffffe00000001