Why does this code only look at the first argument of the list?
 int **split_array(const int *s, int length) {
 14     int **main_array = malloc(sizeof(int *) * 2);
 15     main_array[0] = malloc(sizeof(int) * length / 2);
 16     main_array[1] = malloc(sizeof(int) * length / 2);
 17
 18     for (int i = 0; i < length; i++) {
 19         if (i % 2 == 0) {
 20             main_array[0][i] = s[i];
 21         } else {
 22             main_array[1][i] = s[i];
 23         }
 24     }
 25
 26     return main_array;
 27 }