fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. volatile double v = 0;
  5.  
  6. int main() {
  7. int i1 = 2147483648.0;
  8. int i2 = 2147483648.0 + v;
  9. cout << i1 << endl << i2 << endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
2147483647
-2147483648