【单选题】【消耗次数:1】
下面程序的输出是 int fun3(int x) {static int a=3; a+=x; return(a); } void main() {int k=2,m=1,n; n=fun3(k); n=fun3(m); printf(%d\n }
3
4
6
9
参考答案:
复制
纠错
相关题目
【单选题】 有以下程序,程序执行后的输出结果是( ) #include int fun(int x [ ],int n) { static int sum=0,i; for(i=0; i{ sum+=x[i]; } return sum; } void main( ) { int a[ ]={1,2,3,4,5}; int b[ ]={6,7,8,9},s=0; s=fun(a,5)+fun(b,4); printf(%d\n,s); }
①  45
②  50
③  60
④  66
【单选题】 以下程序的运行结果是( )。 void fun(int array[3][3]) { int j; for(j=0;jj++) array[1][j]=array[1][j]++; printf(\n} void main(){ int j,a[3][3]={0,1,2,1,0,4,2,4,5};fun(a);for(j=0;jj++)printf(%d,a[1][j]); printf(\n }
①  1 0 4
②  2 1 5
③  0 1 2
④  1 2 3
【单选题】 以下程序的输出结果是_______? f(int b[],int m,int n) { int i,s=0; for(i=m;in;i=i+2) s=s+b[i]; return s; } int main() { int x,a[]={1,2,3,4,5,6,7,8,9}; x=f(a,3,7); printf(%d\n,x); }
①  7
②  8
③  9
④  10
【单选题】 下列程序的输出结果是()。 #include fun(int *a,int *b) {int *w;*a=*a+*a;*w=*a; *a=*b; *b=*w;} main( ) {int x=9,y=5,*px=fun(px,py);printf(%d, %d\n,x,y);}
①  出错
②  18,5
③  5,9
④  5,18
【单选题】 以下程序的输出结果是() int a, b; void fun( ) { a=100; b=200; } main( ) { int a=100, b=100; fun( ); printf(%d%d \n, a,b); }
①  100200
②  100100
③  200100
④  200200
【单选题】 以下程序的运行结果是( )。 Main() {int k=4,a=3,b=2,c=; printf(\n %d\n,ka?k:cb?c:a); }
①  4
②  3
③  2
④  1
【单选题】 有以下程序,执行后输出结果是() main( ) { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i { printf(%d ,m[k][i]); } }
①  4 5 6
②  2 5 8
③  3 6 9
④  7 8 9
【单选题】 有说明语句int a[10];及函数int fun(int x[10],int n){return sizeof(x);},则语句cout<<fun(a,10)<<endl;的显示结果是()
①  40
②  10
③  4
④  0
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=1,b=2,c=3; if(c=a)printf(%d\n else printf(%d\n }
①  1
②  3
③  5
④  6
【简答题】 int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;int i;p=a;printf(%d\n,*p++);printf(%d\n,*++p);程序输出结果为[填空1]和[填空2]。
随机题目
【单选题】 The Tang Dynasty is generally regarded as a golden chapter by people worldwide,________ the Chinese civilization influenced many neighboring countries.
①  where
②  when
③  which
④  who
【单选题】 Young people who have got jobs may realize university lessons cant be the only preparation for all of the situations ________ appear in the working world.
①  where
②  when
③  that
④  what
【单选题】 Ithinkthestoryisnotso_______asthatone.
①  interesting
②  interested
③  moreinteresting
④  mostinteresting
【单选题】 This picture was taken at my high-school graduating ceremony on June 10th that year,_______ I still remember well as a great milestone in my life.
①  which
②  when
③  where
④  as
【单选题】 I will visit you if Father_______ me.
①  let
②  lets
③  is letting
④  will let
【单选题】 These children are_______this year than they were last year.
①  moretall
②  moretaller
③  verytaller
④  muchtaller
【判断题】 以中共十八大为标志,科学发展观进一步走向成熟。
①  正确
②  错误
【单选题】 中国共产党第十九次全国代表大会于2017年10月18日至24日在北京举行。全会指出,中国特色社会主义进人新时代,我国社会主要矛盾已经转化为?
①  人民日益增长的物质文化需要同落后的社会生产之间的矛盾
②  总体上实现小康与人民的美好生活需要同日益广泛之间的矛盾
③  人民日益增长的美好生活需要和不平衡不充分的发展之间的矛盾
④  社会生产力水平总体上显著提高与发展不平衡不充分之间的矛盾
【判断题】 实现中国梦必须走和美国一样的发展道路。
①  正确
②  错误
【判断题】 中共十九大提出“两步走”战略的第二步是:从2035年到2050年,建成富强民主文明和谐的社会主义现代化国家。
①  正确
②  错误