http://blogs.msdn.com/oldnewthing/archive/2008/09/02/8918130.aspx for(i=0;i
The Old New Thing : Tales from the interview: Can you rotate this two-dimensional array?September 4, 2008 · algorithm, algorithms, cs, interviews, programming · 1 minhttp://blogs.msdn.com/oldnewthing/archive/2008/09/02/8918130.aspxfor(i=0;i<N;i++) for(j=0;j<M;j++) b[j][N-i]=a[i][j];