what does int** arr and new int*[n] mean??
What does int** arr and new int*[n] mean?
to declare 1D dynamic array we use single pointer
int*arr=new int[n];
similarly to declare 2D dynamic array we use double pointer
int**arr=new int*[n];
int**arr is double pointer
as 2D array is array of arrays
instead of int we use int*[n]