若定义数组a,使得其中每个元素的值依次为:2、4、6、8、0、0,下列定义语句中错误的是( )。
A: int a[]={2,4,6,8};
B: int a[6]={2,4,6,8};
C: int a[6]={2,4,6,8,0,0};
D: int a[]={2,4,6,8,0,0};
A: int a[]={2,4,6,8};
B: int a[6]={2,4,6,8};
C: int a[6]={2,4,6,8,0,0};
D: int a[]={2,4,6,8,0,0};
举一反三
- set1 = {x for x in range(10) if x%2==0} print(set1) 以上代码的运行结果为? A: {0, 2, 4, 6} B: {2, 4, 6, 8} C: {0, 2, 4, 6, 8} D: {4, 6, 8}
- 以下代码的输出结果是()for i in range(0,10,2): print(i,end="") A: 0 2 4 6 8 B: 2 4 6 8 C: 0 2 4 6 8 10 D: 2 4 6 8 10
- 若定义:int x=2,y=8;,则执行语句x+=y-=4;后,x、y的值分别为______。 A: 2、4 B: 2、8 C: 6、4 D: 6、8
- Which statement below initializes array items to contain 3 rows and 2 columns? ( ) A: int[][] items = {{2, 4}, {6, 8}, {10, 12}}; B: int[][] items = {{2, 6, 10}, {4, 8, 12}}; C: int[][] items = {2, 4}, {6, 8}, {10, 12}; D: int[][] items = {2, 6, 10}, {4, 8, 12};
- 正常人空腹血糖水平( ) A: 0~2 B: 2~4 C: 4~6 D: 6~8 E: 8~10