In a program, I have to scan from the input
scanf("%s",currWord);
a non-defined number of words, which come in a non-defined number of lines.
I want to put the words in a 2 dimensional array of strings.
Length of the strings is fixed [MAX_WORD_LEN+1]
My idea is:
int row=10 //10 lines for starting
int col=5 //5 words in each line for starting
int i;
typedef char word[MAX_WORD_LEN+1]; //new type of 11char lenght string
word** matrix; //2 dimensional array (pointers) with no memory
matrix = malloc(row*sizeof(word*)); //allocate row number of word* (word pointer) size
for(i=0;i<row;i++)
{
matrix[i] = malloc(col*sizeof(word)); //allocate col number of words to each row
}
So, I have no idea if that is right.
I'll be happy for some help and tips..
EDIT:
When receiving the words from input I have to increase memory ( number of rows and words in each row) if needed, How do I do that? (realloc ?)
I need to do the following:

typedef char** matrixand then declare your 2D array like:matrix wordListand proceed.realloc(), but ultimately you'll need more information being tracked here than you currently have. Such as the number of words in each row, on a row-by-row basis. Draw on paper for awhile before you code it. It will help, believe me.