【单选题】【消耗次数:1】
以下程序输出结果是( )。 Main() {int x=2,y=-1,z=2; if(xy) if(y0) z=0; else z+=1; printf(%d\n }
3
2
1
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 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 x=2,y,z;x*=3+2;printf(%d\nx*=y=z=4;printf(%d\nx=y=1;z=x++-1;printf(%d,%d\n,x,z);z+=-x++ +(++y);printf(%d,%d,x,z); }程序的输出结果是[填空1]。
【单选题】 设有如下定义:int x=0,y=3,z; 则语句printf(%d\n,z=(x%y,x/y));的输出结果是
①  1
②  0
③  4
④  3
【单选题】 执行下面程序后,运行结果是 #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(){intx=1,y=1,z=1;x=x+++y+++z++;printf("%d,%d,%d",x,++y,z++);}输出的结果为()
①  4,3,2
②  3,3,2
③  3,3,3
④  3,2,2
【单选题】 写出下面程序的执行结果。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
随机题目
【判断题】 答题说明:句子没有语法错误请选择“正确”,有语法错误请选择“错误”Should you jog too? If you do, be sure to ask your doctor for an advice.
①  正确
②  错误
【判断题】 阅读课文II.Everybodys Jogging, 判断下列句子表述内容的正误:Everyone must increase his distance half a mile every two weeks.
①  正确
②  错误
【判断题】 答题说明:句子没有语法错误请选择“正确”,有语法错误请选择“错误”Your long-term memory contains everything that you remember.
①  正确
②  错误
【判断题】 阅读课文II. Department stores 判断下列句子表述内容的正误:Customers can enjoy other services besides buying goods in a store.
①  正确
②  错误
【判断题】 阅读课文II.Everybodys Jogging, 判断下列句子表述内容的正误:Jogging cost you nothing but time.
①  正确
②  错误
【判断题】 答题说明:句子没有语法错误请选择“正确”,有语法错误请选择“错误”Many television programs show violence, which usually has a bad effect on young adults.
①  正确
②  错误
【判断题】 阅读课文II. My first days in Beijing, 判断下列句子表述内容的正误:The writer (作者) was from a small town.
①  正确
②  错误
【判断题】 答题说明:句子没有语法错误请选择“正确”,有语法错误请选择“错误”Once in a small village there was a young boy name John, whom sold cooking oil.
①  正确
②  错误
【判断题】 答题说明:句子没有语法错误请选择“正确”,有语法错误请选择“错误”If you have been in the department store such long that you feel hungry, you will not need to leave the building.
①  正确
②  错误
【判断题】 阅读课文II. Department stores判断下列句子表述内容的正误:Without your receipt you can return any goods at the Customer Service Department.
①  正确
②  错误