In which of the following cases dynamic arrays are not preferred?
In which of the following cases dynamic arrays are not preferred? Correct Answer If the array holds less number of elements
Dynamic arrays are preferred when the size of the array is unknown during memory allocation or the size changes after few iterations or the memory reallocation is expensive. If array holds less number of elements, the physical size is reduced and reduction takes more time. In that case, we can use normal arrays instead of dynamic arrays.