b[I]= a[0][I];
for(I = 0; I< 1; i++)
for(j = 0; j & lt4; j++)
a[I][j]= a[I+ 1][j];
for(I = 0; I<4; i++)
a[2][I]= b[I];
Revise as follows:
for(I = 0; I<4; I++)// Copy the value in the first row of the matrix to copy to the last row, otherwise it will be overwritten.
b[I]= a[0][I];
for(I = 0; I<2; I++)// Moves the matrix up one row, which can be equal to 1.
for(j = 0; j & lt4; j++)
a[I][j]= a[I+ 1][j];
for(I = 0; I<4; I++)// Copy the first line to the last line.
a[2][I]= b[I];