The way to dynamically allocate a 2D array is :
This will create array of pointer to arrays.
We can access elements as a 2D array
a with access particular element.
After allocating space for pointers, is it not the case that i need to allocate space for the array they are pointing to?, as we usually do for a pointer to point to array of elements.
Is my way of freeing ok
Because it will free the pointers , what about the elements associated with those pointers.