以下程序运行时,输出结果第一行是,第二行是。#include #define N 4int main(){int a[5]={5,3,2,1};int i=3,j,k=6;while(i>0 && k>a[i])i--;for(j=N-1;j>=i;j--){a[j+1]=a[j];}a[j+1]=k;for(i=0;i<=N;i++){if(a[i]%2 ==0)printf("%3d\n",a[i]);}return 0;}
以下程序运行时,输出结果中第一行是,第二行是。#include int main(){int a[4][4]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20};int sum1,sum2,i,j;for(sum1=0,sum2=0,i=0;i<4;i++){for(j=0;j<4;j++){if(i==j)sum1+=a[i][j];if(i+j==3)sum2+=a[i][j];}}printf("sum1=%d\n",sum1);printf("sum2=%d\n",sum2);return 0;}
以下程序运行时输出到屏幕的结果中第一行是,第二行是。#include #define M 3#define N 4void fun(int a[M][N]){int i,j,p;for(i=0;ia[i][j])p=j;printf("%d\n",a[i][p]);}}int main(){int a[M][N]={{-1,5,7,4},{5,2,,4,3},{8,2,3,0}};fun(a);return 0;}
以下程序运行时,输出到屏幕的结果中第一行是,第二行是。#include void fun(int a[],int b[],int n){int k,i,j;for(i=0;i