Write a program to set up the following matrix in a 2-dimensional array. The array must be dynamic, i.e. must use pointers and the new operator for space allocation.
you may as well hard code it, there is no pattern.
you could do this to save space:
int data[] = {11, 12, 13,21, 22, 23,8, 9, 10};
int dx = 0;
for(all the rows)
for(all the cols)
arr[row][col] = data[dx++];