【单选题】【消耗次数:1】
执行下面程序后,运行结果是 #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
参考答案:
复制
纠错
相关题目
【单选题】 以下程序段的运行结果是( )。 for(y=1;y) y=((x=3*y,x+1),x-1); printf(x=%d,y=%d,x,y);
①  x=27,y=27
②  x=12,y=13
③  x=15,y=14
④  x=y=27
【单选题】 写出下面程序的执行结果。main( ){ int x,y=1; if(y!=0) printf(“%d\t”,x); if(y= =0) else printf(“%d\t\n”,x);
①  1 3
②  1 5
③  5 3
④  5 5
【单选题】 写出下面程序的执行结果。main( ){ int x,y=1; if(y!=0) printf(“%d\t”,x); if(y= =0) else printf(“%d\t\n”,x);}
①  1 3
②  1 5
③  5 3
④  5 5
【单选题】 写出下面程序的执行结果。main(){ int x=1,y=1,z=0;if(z0)if(y0) x=3;else x=5;printf(%d\tif(z=y0) x=3;else if(y= =0 ) x=5;else x=7;printf(%d\tprintf(%d\t}
①  1 5 1
②  1 7 0
③  3 7 0
④  5 5 0
【单选题】 写出下面程序的执行结果。main(){ int x=1,y=1,z=0;if(z0)if(y0) x=3;else x=5;printf(%d\tif(z=y0) x=3;else if(y= =0 ) x=5;else x=7;printf(%d\tprintf(%d\t
①  1 7 0
②  3 7 0
③  5 5 0
④  1 5 1
【单选题】 写出下面程序的执行结果。main(){ int x=1,y=1,z=0;if(z0)if(y0) x=3;else x=5;printf(%d\tif(z=y0) x=3;else if(y= =0 ) x=5;else x=7;printf(%d\tprintf(%d\t}
①  1 5 1
②  3 7 0
③  5 5 0
④  1 7 0
【单选题】 写出下面程序的执行结果。main(){ int x=1,y=1,z=0;if(z0)if(y0) x=3;else x=5;printf(%d\tif(z=y0) x=3;else if(y= =0 ) x=5;else x=7;printf(%d\tprintf(%d\t}
①  1 7 0
②  3 7 0
③  5 5 0
④  1 5 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
【单选题】 以下程序运行的结果是)main){intx=12,y;y=x>12?x+10:x-12;printf“y=%d\n”,y);}
①  y=0
②  y=22
③  y=12
④  y=10
随机题目
【单选题】 A: Will you be free tomorrow evening? B: [填空]
①  No,Ill be busy.
②  What is the matter?
③  Im sorry I wont be free then.
④  No,Ill have no time.
【单选题】 A: Have you ever been to Huangshan? B:[填空].
①  No. Twice
②  I went there twice
③  Yes. Twice
④  Yes. Ill go there next month
【单选题】 A: Is there a bank near here? B: [填空].
①  Its very far
②  Its here
③  Yes, there is a big one
④  Its very crowded
【单选题】 A: David injured his leg playing football yesterday. B: Really? [填空]
①  Who did that?
②  hats wrong with him
③  How did that happen
④  Why was he so careless?
【单选题】 A: How are you doing?B: [填空].
①  Good night
②  Not so bad. And you?
③  I m pleased.
④  How do you do?
【单选题】 A: Would you like me to feed your cats while youre on your holiday? B: [填空].
①  I appreciate it, but Ive already fed them
②  No problem, I was more than glad to do it
③  Thanks for offering your help, but my sisters going to do it
④  Certainly, feeding cats is my favorite pastime
【单选题】 A: I missed yesterdays basketball final. B: [填空]
①  What a pity!
②  Its a good idea.
③  Remember to bring it next time.
④  Im glad to hear that.
【单选题】 A: May I use your dictionary for a moment? B: [填空].
①  Its well
②  It doesnt matter
③  By all means
④  Here you are
【单选题】 A: Are you feeling better today? B: [填空].
①  There must be something wrong
②  Just have a good rest
③  Yes, thank you, doctor. But I still dont feel good
④  Dont worry about me
【单选题】 A: How about going to dinner at the Mexican restaurant tonight? B: [填空].
①  I like Mexican food
②  Id like to, but I already have plans for tonight
③  Forget it
④  I dont know