Appreciate your prompt response.
Allow me to explain further then, since I think I did not give you enough to clarify my concerns.
Code:
#include <stdio.h>
#include <stdlib.h>
int main (void )
{
size_t i;
size_t row = 5, size = 32;
char **array = malloc(sizeof *array);
if (!array) {
/* handle the error */
}
/*
* This is the part I am interested in
* knowing if it would be correct
*/
for (i = 0, i < row, i++) {
*array[i] = malloc(size); /* does **array have memory for *array[i]? */
if (*array == NULL) {
/* handle the error */
}
}
return 0;
}
I apologize that I did not explain well in my previous post.