rendered paste body#include <stdio.h>
#define SIZE 3
void
arrayproc(int *myar);
int
main() {
int myarray[SIZE][SIZE][SIZE];
int x,y,z, size;
for(x=0; x<SIZE; x++)
for(y=0; y<SIZE; y++)
for(z=0; z<SIZE; z++)
myarray[x][y][z] = 1;
arrayproc(myarray);
for(x=0;x<SIZE;x++)
for(y=0;y<SIZE;y++)
for(z=0;z<SIZE;z++)
printf("%d", myarray[x][y][z]);
return 0;
}
void
arrayproc(int *myar) {
int x,y,z;
for(x=0;x<SIZE;x++)
for(y=0;y<SIZE;y++)
for(z=0;z<SIZE;z++)
*(myar + x * (SIZE * SIZE) + y * SIZE + z) = 3;
return;
}