In 11th line code arr[i]= new int[c];
if arr array is storing the address of pointers variable® then r[i]= new int[c]; should be there, because r is array who is storing the address of linear array.
why we are not including ampersand symbol if we are storing the address of linear array
Problem related to pointers
and in 10th line code why we have included loop to create array. as per my information if we want to create array we should only declare it by as new int[arr];
hello @vikash3303
& is used to get the address of variable. here we r not using that because we are using new operator.
new operator allocates memory for array and then it returns base address which we are storing in arr.
first we have created an array of pointers whose base address is stored in arr.
and then in line no 10.
we are running a loop to allocate memory and store its base address in arr[i]