/**********************************************************
将一个二维数组的行和列进行交换 存到另外一个二维数组中
<Edison wong>. QQ139767
**********************************************************/
#include<stdio.h>
void main()
{
int a[2][3]={1,2,3,4,5,6};
static int b[3][2];
int i,j;
printf("array a:/n");
for(i=0;i<2;i++)
{
for(j=0;j<3;j++)
{
printf("%d ",a[i][j]);
b[j][i]=a[i][j];
}
putchar('/n');
}
printf("array b:/n");
for(i=0;i<3;i++)
{
for(j=0;j<2;j++)
printf("%d ",b[i][j]);
putchar('/n');
}
}