If we use single malloc for a double pointer then it simply means that the memory is allocated to the for the external Pointer
i.e, malloc(**ptr) -> Memory is allocated only for external pointer of *(*ptr) which is allocated in form of array. But to provide (*ptr) a memory location , we have to malloc() it again as follows:
malloc(*ptr) ->Now memory is allocated for *ptr .
To check the amount of memory allocated under **ptr , just print using %d format specifier and as an argument to printf call sizeof(**ptr) .
i.e,
printf(“The size under **ptr is :%d \n”,sizeof(**ptr));