fork download
  1. #include <stdio.h>
  2. #include <limits.h>
  3.  
  4. int main(void) {
  5. int i = INT_MAX;
  6. if (i+1 < i)
  7. printf("overflow");
  8. else
  9. printf("no overflow");
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
no overflow