2 D dynamic arrays | Sololearn: Learn to code for FREE!


2 D dynamic arrays

Is it ok if we do not have any values for the rows and columns in a 2 D dynamic array from the point of view of memory allocation

4/23/2019 2:17:00 PM

Sanjay Kamath

1 Answer

New Answer


I do think it’s fine, even if you access the unitialized value, it might contains random value. My tip here is, after allocating the memory, initialize the default value.