【单选题】【消耗次数:1】
合法的数组定义是()
inta[]={string};
inta[5]={0,1,2,3,4,5};
chara={string};
chara[]={0,1,2,3,4,5}
参考答案:
复制
纠错
相关题目
【单选题】 已知:inta[][3]={1,2,3,4,5,6,7,8,9,0};则数组a的第一维的大小是()
①  2
②  3
③  4
④  无法确定;
【单选题】 已知inta[4][4]={{1,2},{3},{4},{1,2,3}};问a[2][0]该元素的值是()
①  2
②  3
③  4
④  1
【单选题】 有定义语句“int a[][3]={1, 2, 3, 4, 5, 6};”,则a[1][0]的值是____。
①  4
②  1
③  2
④  5
【单选题】 以下程序的运行结果是()。intfun(inta[4][4]){inti;for(i=0;ii++)printf("%2d",a[i][2]);printf("\n");}main(){inta[4][4]={1,1,2,2,1,9,0,0,2,4,0,0,0,5,9,8};fun(a);}
①  1905
②  2000
③  2008
④  2009
【单选题】 若有说明:inta[][3]={{1,2,3},{4,5},{6,7}};则数组a的第一维的大小为:()。
①  2
②  3
③  4
④  无确定值
【单选题】 以下程序段运行后s的值是()。inta[3][3]={1,2,3,4,5,1,2,3,4};inti,j,s=1;for(i=0;ii++)for(j=i+1;jj++)s+=a[i][j];
①  6
②  120
③  7
④  240
【单选题】 在执行inta[][3]={{1,2},{3,4}};语句后a[1][2]的值是()
①  3
②  4
③  0
④  2
【单选题】 这条旋律 “3 4 | 5 6 2 3 | 4 - 1 2 | 3 3 2 2 | 2 1 ||”的节拍为( )
①  2/4
②  3/4
③  4/4
【单选题】 若有定义:int a[][3]={1,2,3,4,5,6,7,8};,则a数组的行数为()
①  无确定值
②  3
③  2
④  1
【单选题】 以下程序段运行后sum的值为()。intk=0,sum=0;inta[3][4]={1,2,3,4,5,6,7,8,9,10,11,12};for(;kk++)sum+=a[k][k+1];
①  9
②  18
③  19
④  21
【单选题】 若定义数组并初始化,运行的结果是() void main( ) { int i,j,a[2][3]={{1,2,3},{4,5,6}}; for(i=0;i for(j=0;j printf(%d,a[i][j]); }
①  1,2,3,4,5,6
②  12345
③  123456
④  无法运行
随机题目
【单选题】 You’re ____ your time trying to persuade him. He’ll never join us. ?
①  spending ?
②  wasting ?
③  losing ?
④  missing?
【单选题】 The boy lost his ____when he stepped on the icy road.
①  way
②  weight
③  balance
④  direction
【单选题】 Never in my life ____ or seen such a thing.
①  I have heard of
②  I had heard of
③  have I heard of
④  did I hear of
【单选题】 —I’m sorry to keep you waiting. —Oh, not at all. I___ here only a few minutes.
①  have been
②  had been
③  was
④  will be
【单选题】 The bus is late and Julie is cold. She____ for the bus for 10 minutes.
①  waits
②  waited
③  has been waiting
④  has waited
【单选题】 Put it down, Richard. You mustnt read ____ letter.
①  anyones elses
②  anyones else
③  anyone elses
④  anyone else
【单选题】 ____ the English examination, I would have gone to the concert last Sunday.
①  In spite of
②  But for
③  Because of
④  As for
【单选题】 Every society has its own peculiar customs and____ of acting.
①  attitudes
②  behavior
③  ways
④  means
【单选题】 “She is from Shanghai, ____ population is larger than that of any other city inChina.”
①  its
②  which
③  whose
④  that
【单选题】 Mary: How do you like Professor White’s lecture? John: ____
①  He talked about economy.
②  He teaches Class 2 students.
③  Very much.
④  He is a middle-aged professor.