有以下程序main(){int a[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}},i,j,k,t;for(i=0;i<4
12 查阅
有以下程序 main() {int a[4][4]={{1,4,3,2},{8,6,5,7},{3,7,2,5},{4,8,6,1}},i,j,k,t; for(i=0;i<4;i++) for(j=0;j<3;j++) for(k=j+1;k<4;k++) if(a[j][i]>a[k][i]){t=a[j][i];a[j][i]=a[k][i];a[k][i]=t;}/*按列排序*/ for(i=0;i<4;i++)printf("%d,",a[i][i]);
A.1,6,5,7,
B.8,7,3,1,
C.4,7,5,2,
D.1,6,2,1,
参考答案: