I am trying to get the number of rows and columns of a 2D Array from a double pointer pointed to the array.
#include
#include
void get_details(int **a)
{
int row = ??? // how get no. of rows
int column = ??? // how get no. of columns
printf("\n\n%d - %d", row,column);
}
I'm afraid you can't, as all you will get is the size of the pointer.
You need to pass the size of the array. Change your signature to:
void get_details(int **a, int ROW, int COL)