char **p;と宣言して、char *とcharの配列を動的につくる。

int i;
p=malloc(sizeof(char *)*size1);
for(i=0;i<size1;i++)
p[i]=malloc(size2);