What's the need of pointers array when we already have simple arrays for array data? We can already use arrays to store data; why would we ever want to use pointers to arrays?
int array[100];
int *ptr = new int[100]
What's the need of pointers array when we already have simple arrays for array data? We can already use arrays to store data; why would we ever want to use pointers to arrays?
int array[100];
int *ptr = new int[100]
There are several reasons to use dynamically-allocated arrays rather than arrays that are local variables.
Space limitations. Which is the main reason for the detailed pointers in an array. So that the variables and the values that we include in the array only will be attached to that specific index so that the space complexity will not occur