Right now, you are passing the whole [4]X[4] array on the stack. It would be better to do either as laserlight suggested, or, pass a pointer to your [4]x[4] array to the RotateBlock() function as in
Code:
void RotateBlock(int * blocks[4][4]) {
int i,j,temp[4][4];
for(i=0;i<4;i++) {
for(j=0;j<4;j++) {
temp[i][j] = *blocks[j][3-i];
}
}
CopyBlock(temp,blocks);
}
Of course, then you would have to change your CopyBlock function. Now, taking that into, consideration, you would be better off, again, with laserlight's suggestion of going to dynamic blocks and just passing pointers around.
If you didn't want to incur the overhead of all the dynamic malloc()s and free()s, and your need for [4]x[4] arrays were fixed at say, 100 of them, you could get an initial 101 arrays and keep a free one anchored some where. Anytime you need to rotate & copy a block, you could grab the free block as the target block, and after your rotate and copy were finished, you could make the source block the new free block.
Todd