names
is an array of arrays.
The scrambler referrs to the outer array. The elements of the latter are the "strings". The size of each string is 10
.
So call the scrambler like this:
res = (char**)scramble(names, 10, 3, indArr);
or
res = (char**)scramble(names, sizeof(*names), 3, indArr);
Update:
To be able to access the single elements of the inner array do as follows:
char (*res)[10] = (char (*)[10]) scramble(names, sizeof(*names), 3, indArr);
for (int i = 0; i < 3; ++i)
printf("res[%d] = '%s'\n", i, res[i]);