fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define MIN -2147483648
  5. #define MAX 2147483647
  6.  
  7. int main( void )
  8. {
  9. long int num = 2147483648;
  10.  
  11. if ( num < MIN || num > MAX )
  12. {
  13. printf ( "The number should be between %d and %d\n", MIN , MAX );
  14. exit( EXIT_FAILURE );
  15. }
  16.  
  17. int ret = (int)num;
  18. printf ( "\nRet = %d\n", ret );
  19. }
Runtime error #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
The number should be between -2147483648 and 2147483647