Just for information, this feature (case X...Y) is not part of C Standard, it belongs to GCC compiler extension
no risk of integer overflow.
Hi good solution, i had the same idea of statical However for turning yours on one line you may use compound litteral (supported since C99) (see my solution)
by using INT_MAX/INT_MIN this solution seem a little bit more portable over any architectures
This comment is hidden because it contains spoiler information about the solution
So far from the solution i read This solution declares only 1 local variable in the function
Loading collection data...
Just for information, this feature (case X...Y) is not part of C Standard, it belongs to GCC compiler extension
no risk of integer overflow.
Hi good solution, i had the same idea of statical
However for turning yours
on one line you may use compound litteral (supported since C99) (see my solution)
by using INT_MAX/INT_MIN this solution seem a little bit more portable over any architectures
This comment is hidden because it contains spoiler information about the solution
So far from the solution i read
This solution declares only 1 local variable in the function
This comment is hidden because it contains spoiler information about the solution