若有定义语句:int a[ ][3]={1,2,3,4,5,6,7};则与该语句等价的是( )
A. int a[ ][3]={{1,2},{3,4},{5,6,7}};
B. int a[ ][3]={{1,}{2,3,4},{5,6,6}};
C. int a[ ][3]={{1,2,3},{4,5,6},{7}};
D. int a[ ][3]={{1,2,3},{4,5},{6,7}};
下列二维数组定义和初始化错误的是( )
A. int a[2][3]
B. int a[2][3] ={{1,2,3},{4,5,6} }
C. int a[2][3]={1,2,3}
D. int a[3][ ]
如有如下定义:Int a[3][4]={{1,2,3,4},{5,6,7,8},{9,10,11,112}};那么a[1][2]元素的结果是( )
A. 12
B. 11
C. 7
D. 9
以下程序运行后的输出结果是().#includeintmain(){chars[]="012xy\08s34f4w2";inti,n=0;for(i=0;s[i]!=0;i++)if(s[i]>='0'&&s[i]<='9')n++;printf("%d\n",n);return0;}
A. 0
B. 7
C. 3
D. 8