Pass array of char pointers by reference
I am building a program with an index of strings (char pointers). So far I have created an array 10 char pointers using
I know that to pass an array of char pointers by value you would do , but how would you do it by reference? in a function definition, and using the & operator with the array of char pointers doesn't seem to work. I know passing by value works fine but that wouldn't be desireable with large amounts of data.
for(i=0; i<10; i++)
index[i] = malloc(20);