下面错误的语句是( )。
A. int a[2][3] = {1, 2, 3, 4, 5, 6};
B. int a[2][3] = {{1, 2, 3}, {4, 5, 6}};
C. int a[ ][ ] = {{1, 2, 3}, {4, 5, 6}};
D. int a[ ][3] = {{1, 2, 3}, {4, 5, 6}};
若有说明 int a[3][4] = {{1}, {2}, {3}}; 则a[1][1]的值是( )。A. 0 B. 1 C. 2 D. 3
A. 0
B. 1
C. 2
D. 3
以下程序的运行结果是 。#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");}}