1 2 3 4
int i, j, t; for(j=0; j<N/2; j++) for(i=0; i<M; i++) { t=a[i][j]; a[i][j]=a[i][N/2+j]; a[i][N/2+j]=t;}