How to manipulate a matrix.

Lets say I have..
int matrix[5][5]={{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2},{3,3,3,3,3},{4,4,4,4,4}};
How do I manipulate this matrix to make it look like...
{{0,0,0,0,0},{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2},{3,3,3,3,3}}
then
{{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{1,1,1,1,1},{2,2,2,2,2}}
and so on.....
What I basically want to do is shift every row down by one or up by one.
Any suggestions???

'for' loops.

What John meant is that C has not particular magic functions to do any matrix manipulation; you have to do it yourself, one element at a time...

you have to do it yourself, one element at a time...

Or a row ata time, using memcpy