Why Do We Have To Initialize When We Reserve Memory With Malloc?
I am trying to understand how to make 2d array with pointers. I found this link. I can't understand fully why do have to initialize each row to its first element. What I also understood from second comment on this link is that he is pointing to array[nrows] from data. After that array[i] take its position as array[nrows] but after this iteration array[i] takes its position as array[nrows+1]?it's not pssible
Perhaps you might have missed this from the 1st answer from your link:
"You then need to go through and initialize the row pointers so that each row's pointer points at the first element for that particular row..."