Printing elements of an array in C
The simple solution is to add a j loop.

void array_print(const int *ptr) {
  for (int j = 0; j &lt; 10; j++) {
    for (int i = j; i &lt; SIZE; i=i+10) {
      printf("%10d", ptr[i]);
    }
    printf("\n");
  }
}




Also look to a wider than "%10d" to cope with "1234567890" running together as well as 11 character "-1234567890".  Perhaps " %11d"?

Better code would pass in int columns, int rows, int size than hard code them.