fork download
  1. #include <inttypes.h> // auto include <stdint.h>
  2. #include <stdio.h>
  3.  
  4. int main(void) {
  5. uint_least64_t soma1 = 10000;
  6. uint64_t soma2 = 10000; // pode haver computadores com C99 e sem este tipo
  7. unsigned long long int soma3 = 10000;
  8. signed long int soma4 = 10000;
  9. signed int soma5 = 10000;
  10.  
  11. soma1 *= 1000000;
  12. soma2 *= 1000000;
  13. soma3 *= 1000000;
  14. soma4 *= 1000000;
  15. soma5 *= 1000000;
  16.  
  17. printf("%" PRIuLEAST64 ", %" PRIu64", %llu, %li, %i\n", soma1, soma2, soma3, soma4, soma5);
  18. printf("sizeof (long)=%zu, sizeof (int)=%zu\n", sizeof (long), sizeof (int));
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 4388KB
stdin
Standard input is empty
stdout
10000000000, 10000000000, 10000000000, 10000000000, 1410065408
sizeof (long)=8, sizeof (int)=4