fork download
  1. #include <cstdio>
  2. #include <climits>
  3. using namespace std;
  4.  
  5. int main(int argc, char ** argv) {
  6. int x = argc + INT_MAX;
  7. if (x < argc)
  8. {
  9. printf("overflow happened\n");
  10. }
  11. printf("%d < %d = %d\n", x, argc, x < argc); return 0;
  12. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
-2147483648 < 1 = 0