fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main()
  5. {
  6. size_t d1 = sizeof(int32_t) - sizeof(int64_t);
  7. size_t d2 = sizeof(int64_t) + d1; // Add difference (even if d1 is "negative"*)
  8.  
  9. printf("d1: %zu\n", d1);
  10. printf("d2: %zu\n", d2);
  11.  
  12. return 0;
  13. // * By "negative" I mean that the d1 would be negative if size_t were signed
  14. }
Success #stdin #stdout 0.02s 1720KB
stdin
Standard input is empty
stdout
d1: 4294967292
d2: 4