Why to use double pointer in the dynamic array declaration in c++
Problem with answer in question no. 3 in pointers MCQ sheet
Double pointer means you are using pointer to a pointer, or in another words
int ** ar=new int *[n]
Since, we are using dynamic memory allocation, it is done using heap,
where int * represents the primary array, and when this primary array points to other arrays, it is treated as a pointer, thats why we use *ar, which is commonly used syntax to declare a pointer