Objective
Implement a function that returns 1 when a long value can be stored in an int without changing, and 0 when that conversion would lose information.
Steps
$ fits_in_int(42)
1
$ fits_in_int(2147483647)
1
$ fits_in_int(2147483648)
0
$ fits_in_int(-2147483648)
1
$ fits_in_int(4294967338)
0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Objective
Implement a function that returns 1 when a long value can be stored in an int without changing, and 0 when that conversion would lose information.
Steps
$ fits_in_int(42)
1
$ fits_in_int(2147483647)
1
$ fits_in_int(2147483648)
0
$ fits_in_int(-2147483648)
1
$ fits_in_int(4294967338)
0
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Tests
Run the tests to grade your code