aqui mi codigo
Código:
#include <stdio.h>
int main(){
char ** M;
int i = 0,n,N=0;
char cad[30]={};
M = (char **)malloc(sizeof(char *));
do{
printf("Cadena: ");
gets(cad);
n = strlen(cad)+1;
*(M+i) = (char *)malloc(n*sizeof(char));
strcpy(*(M+i),cad);
i++;
N++;
M = (char **)realloc(M,sizeof(char*));
}while(cad[0]!='\0');
i = 0;
do{
puts(*(M+i));
i++;
}while(i<N);
getch();
return 0;
}