Suppose I have int ****ptr;
. I want to allocate a dynamic 1-dimensional array on the end of this ptr, so when I type ***ptr[4]
I would yield an element. Please, help.
p.s.
I am not using this code in my real applications, it's just an intellectual exercise to understand how pointers work.
I cannot directly do ***ptr = malloc(sizeof(int)*size_of_arr));
right? BEcause this way i will not be able to yield any elements