题目内容

下列程序执行后的输出结果是__________。main(){ int i,j,a[3][3];for(i=0;i<3;i++)for(j=0;j<=i;j++) a[i][j]=i*j;printf("%d,%d\n",a[1][2],a[2][1]);}

A. 2,2
B. 不定值,2
C. 2
D. 2,0

查看答案
更多问题

下列程序执行后的输出结果是________。main(){ int i,j,a[3][3];for(i=0;i<3;i++)for(j=0;j<=i;j++) a[i][j]=i*j-1;printf("%d,%d\n",a[1][1],a[2][2]);}

A. 2,0
B. 1,4
C. 2,1
D. 0,3

写出程序执行结果:下面程序的运行结果是:#include main( ){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int i;for (i=0; i<3; i++)printf("%d",a[i][2-i]);}

下面程序的运行结果是:。#include main( ){ int i,j,row=0, colum=0,max;int a[3][4]={{1,2,3,4},{9,8,7,6},{-10,10,-5,2}};max=a[0][0];for (i=0; i<=2; i++)for(j=0; j<=3; j++)if (a[i][j]>max){max=a[i][j]; row=i; colum=j; }printf("max=%d,row=%d,colum=%d\n",max,row,colum);}

下面程序的运行结果是:。#include main( ){ int a[4][5]={{1,2,3,4,0},{2,2,0,0,0},{3,4,5,0,6},{5,0,0,6,0}};int i,j;for (i=0; i<4; i++){for ( j=0; j<5; j++){if (a[i][j]==0)break;printf("%d",a[i][j]);}}printf("\n");}

答案查题题库