fork download
  1. #include <stdio.h>
  2. #include <limits.h>
  3.  
  4. int main(void){
  5. // 負のオーバーフロー
  6. printf("%d == %d\n", INT_MIN - 1, INT_MAX);
  7.  
  8. // アンダーフロー
  9. printf("%f == %f\n", 1e10f + 1.0f, 1e10f);
  10. }
  11.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
2147483647 == 2147483647
10000000000.000000 == 10000000000.000000