Storing an array pointer in an array!

The code does not work.

Of course not. You are passing a pointer to an array of Strings to testpassarray. Then, in that function, you are creating, on the stack, an array of ints. Then, you are trying to set the first element beyond the end of the array to the value that is the address of the array of Strings.

Once the function ends, the array of ints goes away. The invalid assignment is lost.

You need to properly allocate space for the array, statically as a global array, or dynamically, using malloc() or new. The array MUST be of the right type to hold the pointers. You must assign the pointer to a valid element in the array.

There are just too many things you are doing wrong in that code.