
Implement a function that rearranges the elements of an integer array in non-decreasing order, modifying the buffer directly without returning anything.
int t[] = {4, 1, 3, 2}; sort_array(t, 4);Expected result
{1, 2, 3, 4}For your own tracking. Tests grade your code.
int t[] = {-2, 5, -7, 0, 3}; sort_array(t, 5);Expected result
{-7, -2, 0, 3, 5}Expected files
sort_array.cAllowed functions
None. Write every helper yourself.

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that rearranges the elements of an integer array in non-decreasing order, modifying the buffer directly without returning anything.
int t[] = {4, 1, 3, 2}; sort_array(t, 4);Expected result
{1, 2, 3, 4}For your own tracking. Tests grade your code.
int t[] = {-2, 5, -7, 0, 3}; sort_array(t, 5);Expected result
{-7, -2, 0, 3, 5}Expected files
sort_array.cAllowed functions
None. Write every helper yourself.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.