int** a = new int*[rowCount];
for(int i = 0; i < rowCount; ++i)
a[i] = new int[colCount];
int** arr = new int*[10]; // Number of Students
int i=0, j;
for (i; i<10; i++)
arr[i] = new int[5]; // Number of Courses
/*In line[1], you're creating an array which can store the addresses
of 10 arrays. In line[4], you're allocating memories for the
array addresses you've stored in the array 'arr'. So it comes out
to be a 10 x 5 array. */
int ** two_dim_array(int row_num, int col_num)
{
int **two_dim_array=(int **)malloc(sizeof(int *)*row_num);
int i, j;
for(i=0:i<row_num;i++)
{
two_dim_array[i]=(int *)malloc(sizeof(int)*col_num);
for(j=0:j<col_num;j++)
two_dim_array[i][j]=0;
}
return two_dim_array;
}