
Implement a function that fills out with the indices of arr ordered by string length, shortest first, without touching arr itself.
char *arr[] = {"gcc", "a", "make"}; argsort_len(arr, 3, out);Expected result
1 0 2For your own tracking. Tests grade your code.
char *arr[] = {"zsh", "ash", "csh"}; argsort_len(arr, 3, out);Expected result
1 2 0char *arr[] = {"vim", "ed", "emacs"}; argsort_len(arr, 3, out); print out, then arrExpected result
1 0 2
vim ed emacssize_t out[2] = {99, 99}; argsort_len(arr, 0, out);Expected result
99 99Expected files
argsort_len.cAllowed functions
None. Write every helper yourself.
Allowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that fills out with the indices of arr ordered by string length, shortest first, without touching arr itself.
char *arr[] = {"gcc", "a", "make"}; argsort_len(arr, 3, out);Expected result
1 0 2For your own tracking. Tests grade your code.
char *arr[] = {"zsh", "ash", "csh"}; argsort_len(arr, 3, out);Expected result
1 2 0char *arr[] = {"vim", "ed", "emacs"}; argsort_len(arr, 3, out); print out, then arrExpected result
1 0 2
vim ed emacssize_t out[2] = {99, 99}; argsort_len(arr, 0, out);Expected result
99 99Expected files
argsort_len.cAllowed functions
None. Write every helper yourself.
Allowed headers

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