Objective
Write a function that says whether the product n * size fits in a size_t, writing that product through out when it fits and leaving out alone when it does not.
Steps
$ checked_size(1000, 24, &out)
1 24000
$ checked_size(0, 8, &out)
1 0
$ checked_size(3, SIZE_MAX / 3, &out)
1 18446744073709551615
$ checked_size(SIZE_MAX, SIZE_MAX, &out)
0
$ checked_size(SIZE_MAX, 2, &out) with out = 777, out printed either way
0 777
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Objective
Write a function that says whether the product n * size fits in a size_t, writing that product through out when it fits and leaving out alone when it does not.
Steps
$ checked_size(1000, 24, &out)
1 24000
$ checked_size(0, 8, &out)
1 0
$ checked_size(3, SIZE_MAX / 3, &out)
1 18446744073709551615
$ checked_size(SIZE_MAX, SIZE_MAX, &out)
0
$ checked_size(SIZE_MAX, 2, &out) with out = 777, out printed either way
0 777
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers

Tests
Run the tests to grade your code