【单选题】【消耗次数:1】
1. 对下面程序段描述正确的是int x=0,s=0; while (x!=0) s=s+x+1;printf(%d
运行程序段后输出0
运行程序段后输出1
程序段中的控制表达式是非法的
程序段循环无数次
参考答案:
复制
纠错
相关题目
【单选题】 执行下面程序段后,输出字符B的个数是(   )x=0;while(x=5){printf("B");x+=2;}
①  0个
②  3个
③  5个
④  6个
【简答题】 下面程序段的运行结果是[填空1]。char c[5]={a,b,\0,c,\0};printf(%s,c);
【单选题】 以下程序段. x=-1; do { x=x*x; } while (!x);
①  是死循环
②  循环执行两次
③  循环执行一次
④  有语法错误
【单选题】 以下程序段 x=-1; do {x=x*x;} while(!x);
①  是死循环
②  循环执行两次
③  循环执行一次
④  有语法错误
【单选题】 假定所有变量均已正确说明,下列程序段运行后x的值是。a=b=c=0;x=35;if(!a) x=-1;else if(b);if(c) else
①  35
②  34
③  4
④  3
【单选题】 假定所有变量均已正确说明,下列程序段运行后x的值是。a=b=c=0;x=35;if(!a) x=-1;else if(b);if(c) else
①  34
②  4
③  35
④  3
【单选题】 下面的程序段运行后,显示的结果是( )。 Dim x If x Then Print x Else Print x+1
①  1
②  0
③  -1
④  显示出错信息
【单选题】 若有函数定义:intfunc(){staticintm=0;returnm++;}以下程序段运行后屏幕输出为()。inti;for(i=1;ii++)func();printf("%d",func());
①  0
②  1
③  4
④  5
【简答题】 以下程序段输出的结果是[填空1]。#include stdio.hvoid main(){int x=1;do printf(%d\n,x-=2);while(!(--x));}
【单选题】 以下程序段输出的结果是)a=-1;do{a=aa;}whilea<0);
①  循环一次
②  循环两次
③  死循环
④  有语法错误
随机题目
【单选题】 It is better to die ones feet than _______.
①  living on ones knees
②  live on ones knees
③  on ones knees
④  to live on ones knees
【单选题】 But the houses were cold, closed,______, and I ran on until I heard Jeremys screams behind me announcing that our attackers had fled.
①  unfriendly
②  unfriend
③  not friend
④  not friendly
【单选题】 Outsideofclass,teachersplanlessons,gradepapers,and_____withstudentstodiscusstheirprogress.
①  met
②  meeting
③  to meet
④  meet
【单选题】 Without entering the body and______damage, the CT is far superior to the X-ray or exploratory surgery.
①  cause
②  causing
③  caused
④  to be caused
【单选题】 HelenKeller,whowasbothblindand______,overcameherinabilitywiththehelpofherteacher,AnnSullivan.
①  deafness
②  deafening
③  deaf
④  deafened
【单选题】 Judylikescampinginthewoods,hikinginthemountaintrails,and_____.
①  canoeing
②  canoes
③  to canoe
④  canoed
【单选题】 Some Italian scholars stressed the study of grammar, rhetoric, ____and poetry.
①  learning history
②  history
③  study of history
④  history learning
【单选题】 IlikewatchingTV_______tothecinema.
①  more than to go
②  more than going
③  than going
④  rather than to go
【单选题】 Psychologistsagreethatitisimportantforchildrentofeelacceptance,______andlovefromtheirparents.
①  securing
②  secure
③  secured
④  security
【判断题】 <img title=7-错.jpg alt=7-错.jpg src=https://huaweicloudobs.ahjxjy.cn/7CF485A441F7295FD06078C619987839.jpg/>
①  正确
②  错误