summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/14_17.c
blob: d7e1fd740d2e19d83527e9c990c29d0ea77fe30b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define X_SIZE 60
#define Y_SIZE 30

int matrix[X_SIZE][Y_SIZE];

void init_matrix(void)
{
    register int *matrix_ptr;

    for (matrix_ptr = &matrix[0][0]; 
             matrix_ptr <= &matrix[X_SIZE-1][Y_SIZE-1];
             matrix_ptr++) {

        *matrix_ptr = -1;
    }
}