Code:
char *names[MAX_NAME_COUNT][MAX_NAME_LEN];
which declares a 2D array of pointers to char, should be:
Code:
char names[MAX_NAME_COUNT][MAX_NAME_LEN];
which declare an array of (allocated) strings.
Code:
scanf("%s", names[x][0]);
should be:
Code:
scanf("%s",names[x]);
as names[x][0] is only the 1st character of the xth string. You should also make sure scanf does not overrun the allocated space.
Code:
printf("%s\n", names[x][0]);
same thing here, this should be names[x] only.
There are no compilation errors, but the program crashes after the first name is entered
You were using unallocated memory.