
Write a function that allocates and returns an array containing every integer from max down to min, inclusive.
range_desc(1, 4)Expected result
[4, 3, 2, 1]For your own tracking. Tests grade your code.
range_desc(-2, 1)Expected result
[1, 0, -1, -2]range_desc(5, 5)Expected result
[5]Expected files
range_desc.cAllowed functions
mallocAllowed headers

Write a function that allocates and returns an array containing every integer from max down to min, inclusive.
range_desc(1, 4)Expected result
[4, 3, 2, 1]For your own tracking. Tests grade your code.
range_desc(-2, 1)Expected result
[1, 0, -1, -2]range_desc(5, 5)Expected result
[5]Expected files
range_desc.cAllowed functions
mallocAllowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.
v0.40: Create exercises. Challenge the community.
Meet Studio →