fork(3) download
  1. #include <iostream>
  2. #include <limits.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int a = INT_MAX;
  8. float b = a; // b is correct
  9. int a_new = b; // a_new becomes INT_MIN
  10. printf("%d\n", INT_MAX);
  11. printf("%d\n", a_new);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
2147483647
2147483647