Is there something wrong with the code below to allocate matrix 4X7?
char** imd = (char**)calloc(4, 7);
for (i=0; i < 4; i++)
imd[i] = (char*)calloc(7, sizeof(char));
//then free allocated memory as below
for (i=0; i<4; i++)
free(imd[i]);
free(imd);