I have a hard time understanding this code:
int **arr = malloc(l * sizeof(int *));
for (i=0; i<l; i++)
arr[i] = (int *)malloc(c * sizeof(int));`
- Why did we use a double pointer and not just one?
- And also I didn't understand the logic behind this code, so can you please explain it to me line by line.