memcpy
//somewhere I have this
char *thisCommandArgs[ishellargs_num];
//then some looping do/while code to fill in each of the pointers like the follow
thisCommandArgs[nextCmdIndex] = strdup(token);
//it all prints fine with this code
for (int i = 0; i < ishellargs_num; i++) {
printf("*%s*\n", thisCommandArgs[i]);
}
//then if I memcopy
memcpy(&lastCommandArgs, &thisCommandArgs, sizeof(thisCommandArgs));
//then print using a similar for loop to above on lastCommandArgs I get a segfault