【单选题】【消耗次数:1】
下列程序的输出结果是()。 #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
【单选题】 有如下程序int func(int a,int b){ return(a+b); }main( ){ int x=2,y=5,z=8,r;r=func(func(x,y),z);printf(%d\n }该程序的输出结果是(  )。
①  12
②  13
③  14
④  15
【单选题】 有以下程序,程序执行后的输出结果是( ) #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
【单选题】 下面程序的输出结果是 #includevoid main() { int a=5,b=3; float x=3.14, y=6.5; printf(%d,%d\n,a+b!=a-b,x=(y-=6.1)); }
①  1,0
②  0,1
③  1,1
④  0,0
【单选题】 下面程序的输出是 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
【单选题】 下面程序的输出结果是() main( ) {int x=40,y=4,z=4; x=y==z; printf(%d,x); x=x==(y-z); printf(%d,x); }
①  40
②  41
③  11
④  10
【单选题】 以下程序的输出结果是_______? 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
【单选题】 执行下面程序后,运行结果是 #includevoid main( ) { int x=41,y=1; if (x%3==0 x%7==0) { y+=x;printf(y=%d\n} else {y=x;printf(y=%d} }
①  y=41
②  y=43
③  y=42
④  y=1
【单选题】 以下程序的运行结果是。main( ){int c,x,y; x=1; y=1; c=0; c=x++||y++; printf(“\n%d%d%d\n”,x,y,c);}
①  110
②  011
③  211
④  001
【单选题】 以下程序的运行结果是。main( ){int c,x,y; x=1; y=1; c=0; c=x++||y++; printf(“\n%d%d%d\n”,x,y,c);}
①  110
②  211
③  011
④  001
随机题目
【单选题】 A Chinese traditional wedding ceremony will ______us perfectly.
①  follow
②  join
③  combine
④  suit
【单选题】 The number of people invited______ sixty, but a number of them______ absent for different reasons.
①  were; was
②  was; was
③  was; were
④  were; were
【单选题】 Whatsurprisedmewasnotwhathesaidbut_______hesaidit.
①  the way
②  in the way that
③  in the way
④  the way which
【单选题】 —Are you a teacher?—No, but I ________ once. I worked in a middle school for three years.
①  am
②  will
③  do
④  was
【判断题】 课程学习临近结束时,除了对课程内容及时复习练习外,还须检查各时间段的学习情况、作业完成情况并确保在规定时间内提交,明确课程考核方式及考试时间。
①  正确
②  错误
【单选题】 It is said that people can ______ or deposit money from bank through facial recognition, ie, they dont have to use a bank card.
①  snatch
②  rob
③  draw
④  pull
【单选题】 —Is your mother going to the supermarket?—No, _______.
①  she doesnt
②  shes cooking
③  she gets by bus
④  to a tailors shop
【单选题】 Put up the passbook and the card properly. ______us as soon as possible if you lose them.
①  Reform
②  Inform
③  Transform
④  uniform
【单选题】 Neither the students nor the professor______ anything about it.
①  knows
②  know
③  is known
④  are knowing
【单选题】 If you don’t go to the theatre tomorrow afternoon,______.
①  nor will I
②  I neither will
③  either I will
④  I will either