You should write lots of little testbed programs so you can concentrate on the details of each thing.
This represents just one way to allocate space for an array of strings.
#define STR_MAX 256
#define STR_CNT 6
char *buf, *data[STR_CNT];
/* don't take malloc for granted -- test it */
if ((buf = malloc (STR_MAX * STR_CNT)) == NULL)
fprintf (stderr, "malloc error");
/* don't trash the alloc'd address, either */
char *tmp = buf; int i;
for (i = 0; i < STR_CNT; i++)
data[i] = tmp;
tmp += STR_MAX;
sprintf (data[i], "data-%d", i);
/* did it work? */
printf ("\n%s %s %s\n", data, data, data);
printf ("%s %s %s\n\n", data, data, data);
The point is, every program, no matter how complicated, is made up of fairly small, manageable steps -- so master those first.