134 (10)

(5)

134 % 5 = 4
134 / 5 = 26

26 % 5 = 1
26 / 5 = 5

5 % 5 = 0
5/5 = 1

1 % 5 = 1
1 / 5 = 0

1014 (5)  = 4 + 1*5 + 0*5*5 + 1*5*5*5

-----------------------------------------------------

78 (10) --> (4)

78 / 4 = 19
78 % 4 = 2

19 / 4 = 4
19 % 4 = 3

4 / 4 = 1
4 % 4 = 0

1 /4 = 0
1 % 4 = 1

1032 (4) =  2 + 3 * 4 + 0 * 4*4  + 1*4*4*4

-----------------------------------------------------


1-dimensional array:

        int array[15];// 1-D array

        for (int i = 0; i < 15; i++) {
                printf("%p\n", &array[i]);// same as printf("%p\n", array)  for i==0
                printf("%d\n", array[i]);// array element's VALUE
        }

        for (int i = 0; i < 15; i++) {
                printf("%p\n", (array + i));// same results as before
                printf("%d\n", *(array + i));// array element's VALUE
        }

        
2-dimensional array:
        int array[3][5];// 1-d array of 3 pointers to 1-D arrays of 5 integers !

        int array2[ 3 * 5 ];// looks like the 1-D array above, in memory
        // 3 rows of 5 cells each!

        // row-major order:
        for (int y = 0; y < 3; y++) {
                for (int x = 0; x < 5; x++) {
                        printf("%d  ", array2[ y*5 + x ]);
                }
                printf("\n");
        }