【单选题】【消耗次数:1】
设有定义 int a[10]={0,0,0,0,0,0,0,0,0,0};则说法正确的是( )。
数组a有1个元素,其值为0
数组a有10个元素,各元素的值为0
数组a有10个元素,其中a[0]的值为0,其他元素的值不确定
数组初始化错误,初值个数少于数组元素个数
参考答案:
复制
纠错
相关题目
【单选题】 要定义一个int型数组A,并使其各元素具有初值9,0,3,0,0,不正确的定义语句是()
①  int A[]={9,0,3}
②  int A[]={9,0,3,0,0}
③  int A[5]={9,0,3}
④  int A[5]={9,0,3,0}
【判断题】 若一维数组元素个数为n,则数组元素的最大下标是n,最小下标是0。
①  正确
②  错误
【单选题】 设二维数组A[0..m-1][0..m-1]按行优先顺序存储,则元素A[i][j]的地址为
①  LOG(A[0][0])+(i*m+j)
②  LOG(A[0][0])+(i*n+j)
③  LOG(A[0][0])+[(i-1)*n+j-1]
④  LOG(A[0][0])+[(i-1)*m+j-1]
【单选题】 设二维数组A[5][6]按行优先顺序存储在内存中,已知A[0][0] 起始地址为1000,每个数组元素占用5个存储单元,则元素A[4][4]的地址为( )。
①  A.1140
②  B.1145
③  C.1120
④  D.1125
【判断题】 假设A是一维数组名,则*A和A[0]访问的是同一个数组元素。
①  正确
②  错误
【单选题】 设二维数组A[0…m-1][0…n-1]按行优先顺序存储在内存中,第一个元素的地址为p,每个元素占k个字节,则元素aij的地址为( )。
①  p +[i*n+j-1]*k
②  p+[(i-1)*n+j-1]*k
③  p+[(j-1)*n+i-1]*k
④  p+[j*n+i-1]*k
【单选题】 表达式(12==0) && (1/0 < 1)的值为( ) 。
①  true
②  false
③  0
④  运行时抛出异常
【判断题】 数组num的定义为:int num[ ][3]={{0},{1,2,5},{6}};由此可知该数组是一个3行3列的共有9个元素的数组。
①  正确
②  错误
【单选题】 已知int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;不能表示数组a中元素的式子是()
①  *a
②  *p
③  a
④  a[p-a]
【单选题】 若数组A[0…m][0…n]按列优先顺序存储,则aij地址为( )。
①  LOC(a00)+[j*m+i]
②  LOC(a00)+[j*n+i]
③  LOC(a00)+[(j-1)*n+i-1]
④  LOC(a00)+[(j-1)*m+i-1]
随机题目
【单选题】 Excuse me. I don’t want to interrupt you but …
①  Can I help you?
②  Certainly, how dare you
③  It’s quite all right
④  Yes, you did
【单选题】 Latin America has an __________ labor force and natural resources.
①  wealthy
②  abundant
③  scattered
④  deposited
【单选题】 Could I use your dictionary for a moment?
①  It’s well
②  It doesn’t matter
③  By all means
④  I have no idea
【单选题】 Can I borrow your camera for a couple of days?
①  Yes, you may borrow
②  Yes, go on
③  Sure, here you are. Enjoy your journey
④  It doesn’t matter
【单选题】 Hardly ever _________ get a good job these days without a good education.
①  people might
②  people can
③  do people
④  have people
【单选题】 Dieters should try to reach and __________ a reasonable weight.
①  contain
②  secure
③  reserve
④  maintain
【单选题】 He said he would continue a support us we didn’t break the rules.
①  as well as
②  as soon as
③  as far as
④  as long as
【单选题】 Congratulations! You won the first prize in today’s speech contest.
①  Yes, I beat the others
②  No, no, I didn’t do it well
③  Thank you
④  Dont mention it.
【单选题】 Children learn best by studying at their own __________ .
①  rate
②  speed
③  pace
④  growth
【单选题】 How about going to the cinema tonight, Jane?
①  I don’t think so
②  I’m sorry. I have to drive my mother home tonight
③  Never mind
④  Take it easy