【单选题】【消耗次数:1】
以下函数的功能是:通过键盘输入数据,为数组中的所有元素赋值。 #defineN10; Voidarrin(intx[N]) {   inti=0;   while(i  scanf(“%d”,__________); } 在下划线处应填入的是()
x+i
&x[i+1]
x+(i++)
&x[++i]
参考答案:
复制
纠错
相关题目
【简答题】 以下程序输出的结果是[填空1]。#include stdio.hvoid main(){ int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}
【简答题】 以下程序输出的结果是[填空1]。#include stdio.hvoid main(){ int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}
【简答题】 以下程序输出的结果是[填空1]。#include stdio.hvoid main(){int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}
【单选题】 若有定义:inti,x=0;语句for(i=1;ii++)x+=2;与下列()程序段不等价。
①  i=1;for(;ii++)x+=2;
②  i=1;for(;;i++)x+=2;
③  for(i=1;i){x+=2;i++;}
④  i=1;for(;i){x+=2;i++;}
【单选题】 以下程序的输出的结果是()。 int x=3; main( ) int i; for(i=1;i<x;i++)incre( );incre( ) staic int x=1; x*=x+1; printf( %d, x);
①  25
②  26
③  27
④  28
【单选题】 设有程序:则在程序中的两个括号中分别应填入() main( ) { int i,a[11]; printf(给数组赋值:\n); for (i=0;i scanf(%d,( )); ... ... printf(输出数组:\n); for(i=0;i printf(%d,,( )); }
①  a[i]和a[i]
②  a[i]和a[i]
③  a[i]和a[i]
④  a[i]和a[i]
【单选题】 以下程序段运行后x的值为()。inta[8]={1,2,3,4,5,6,7,8},i,x=0;for(i=0;ii++,i++)x=x+a[i];
①  36
②  16
③  20
④  18
【单选题】 设语句x++的时间是单位时间,则以下语句的时间复杂度为( )。 for(i=1; i<=n; i++) for(j=i; j<=n; j++) x++;
①  O(1)
②  O(n的平方)
③  O(n)
④  O(n的立方)
【单选题】 循环for(int i=0,x=0;!x&&i<=5;i++);的循环体执行次数是()
①  5
②  6
③  1
④  无限
【简答题】 下面程序以每行4个数据的形式输出a数组。#define N 20 #include stdio.hvoid main() { int a[N],i;for(i=0; i i++) scanf(%d,[填空1]);for(i=0; i i++) { if([填空2]) [填空3]; printf(%3d,a[i]);}}
随机题目
【判断题】 每个人的职业价值观都是固定的,是本性使然,不会随着时间、经历的改变而改变。
①  正确
②  错误
【判断题】 1976年“文化大革命”结束后,造成党和国家的工作在徘徊中前进局面的根源在于“阶级斗争为纲”的错误方针。
①  正确
②  错误
【判断题】 2012年11月党的十八大提出,倡导富强、民主、文明、和谐,倡导自由、平等、公正、法治,倡导爱国、敬业、诚信、友善,积极培育和践行社会主义核心价值观。
①  正确
②  错误
【判断题】 中国共产党的最早组织是在武汉成立的。
①  正确
②  错误
【判断题】 洋务运动是一场资产阶级的改良运动。
①  正确
②  错误
【判断题】 抹灰墙面装修是由底层、中层、面层三个层次组成。
①  正确
②  错误
【单选题】 We have a high regard for Prof. Joseph because he always _____his principles.
①  lives on
②  lives up to
③  lives through
④  lives with
【单选题】 A large part of a person’s memory is _____words and combination of words.
①  by means of
②  in terms of
③  in connection with
④  by way of
【单选题】 _____the center of our planetary system was considered as heresy by the church in the Middle Ages.
①  It is the sun and not the earth
②  That the sun and not the earth is
③  Being the sun and not the earth
④  The sun and not the earth
【判断题】 半导体的导电能力介于导体与绝缘体之间,硅和锗是最重要的两种半导体材料。
①  正确
②  错误