I have a 2-D array of characters e.g. char aList[numStrings][maxLength]. ideally, during program execution I want to be able to modify the contents of aList i.
char aList[numStrings][maxLength]
You can dynamically allocate the array:
char **aList; int i; aList = malloc(sizeof(char *) * numStrings); for (i = 0; i < numStrings; i++) { aList[i] = malloc(maxLength); }
If, by any chance, you can use C++ instead of C, you could always use a C++ vector:
std::vector > aList;