I have dynamically allocated 2D array. Here is the code
int **arrofptr ; arrofptr = (int **)malloc(sizeof(int *) * 2); arrofptr[0] = (int *)malloc(sizeof(int
You can't find size of arrofptr, because it is only a pointer to pointer. You are defining an array of arrays using that. There's no way to tell the size information with only a pointer, you need to maintain the size information yourself.
arrofptr