以下程序的运行结果是 。#include void main( ){int a[10] = {1,2,3,4,5,6,7,8,9,10};int b[10] = {10,9,8,7,6,5,4,3,2,1};int i, j;for (i = 1,j = 9; i < 10 && j > 0; i += 2, j -= 3)printf(“a[%d]*b[%d] = %d\n”, i, j, a[i] * b[j]);}
以下程序的运行结果是 。#include void main( ){int a[3][4], i, j;for (i = 0; i<3; i++ )for (j = 0; j<4; j++ )a[i][j] = i + j;for (i = 0; i < 3; i++ ){for (j = 0; j<4; j++ )printf("a[%d][%d] = %d ", i, j, a[i][j]);printf("\n");}}
以下程序是求矩阵a,b的乘积,结果存入矩阵c中,并按矩阵形式输出。请填空。#include void main( ){ int a[3][2] = {1,2,3,4,5,6};int b[2][2] = {2,4,6,8};int i,j,k,s,c[3][2];for(i = 0;i<3;i++ )for(j = 0;j<2;j++ ){for( ; k<2; k++ )s += ;c[i][j] = s;}for(i = 0;i<3;i++ ){for(j = 0; j<2; j++ )printf(“%6d”, c[i][j]);;}}
选用括号内的词填空。1. The car hit the man _______ he was crossing the road.(when , while ,as soon as, not…until )