【单选题】【消耗次数:1】
若a为整型变量,则以下语句a=-2;printf(%d\n,a);()
赋值不合法
输出为不确定的值
输出值为-2
输出值为2
参考答案:
复制
纠错
➡️如需代学继续教育,联系微信:yizhituziang

相关题目
【单选题】 若有语句char c1=`d`,c2=`g`;printf(“%c,%d\n”,c2-`a`,c2-c1);则输出结果为:()(a的ASCII码值为97)
①  M、2
②  G、3
③  G、2
④  D、g
【单选题】 设整型变量n的值为2,执行语句“n+=n-=n*n”后,n的值是()
①  0
②  2
③  -4
④  4
【单选题】 下面循环语句执行结束后输出的i值为( )。 for(int i=0;in/2){coutiendl;break;}
①  n/2
②  n/2+1
③  n/2-1
④  n-1
【单选题】 若i为整型变量,则以下循环执行次数是(). for(i=2;i==0;) printf(%d,i--);
①  无限次
②  0次
③  1次
④  2次
【单选题】 语句:printf("%d",(a=2)&&(b=-2));的输出结果是()
①  无输出
②  结果不确定
③  1
④  2
【单选题】 下面循环语句执行结束后输出的i值为( )。 for(int i=0;in/2){cout<<i<<endl;break;}
①  n/2
②  n/2+1
③  n/2-1
④  n-1
【单选题】 以下不能输出字符A的语句是()(注:字符A的ASCII码值为65,字符a的ASCII码值为97)
①  printf(“%c\n”,’A’-32)
②  printf(“%d\n”,’A’);
③  printf(“%c\n”,65);
④  printf(“%c\n”,’B’-1);
【单选题】 已知字母a的ASCII十进制代码为97,则执行下列语句后的输出结果为(). char a=a; a--; printf(%d,%c\n,a+2-0,a+3-0);
①  b,c
②  a--运算不合法,故有语法错
③  98,c
④  格式描述和输出项不匹配,输出无定值
【单选题】 已知字母a的ASCII十进制代码为97,则执行下列语句后的输出结果为(). chara=a;a--; printf(%d,%c\n,a+2-0,a+3-0);
①  b,c
②  a--运算不合法,故有语法错
③  98,c
④  格式描述和输出项不匹配,输出无定值
【单选题】 下列各语句序列中,能够且仅输出整型变量a、b中最大值的是()。
①  if(ab)printf(%d\n,a);printf(%d\n,b);
②  printf(%d\n,b);if(ab)printf(%d\n,a);
③  if(ab)printf(%d\n,a);elseprintf(%d\n,b);
④  if(ab)printf(%d\n,a);printf(%d\n,b);
随机题目
【单选题】 When you meet someone who ____ deeply about something, you probably will want to ask them why they do so.?
①  absorbs ?
②  cares ?
③  considers ?
④  minds?
【单选题】 Theory is based on practice and in____ serves practice.
①  turn
②  tone
③  tune
④  practice
【单选题】 When I got there, Henry ____ to the hospital.
①  had been sent
②  would send
③  was sent
④  would be sent
【单选题】 The engineers are going through with their highway project, ____the expenses have risen.
①  even though
②  just because
③  now that
④  as though
【单选题】 A police officer claimed he had attempted to ____ paying his fare.
①  avoid
②  reject
③  refuse
④  neglect
【单选题】 The students were not____ to leave the classroom without an adequate reason.?
①  permitted ?
②  remitted ?
③  admitted ?
④  emitted?
【单选题】 It was a minor illness, and she soon ____ it. ?
①  got over ?
②  got on with ?
③  got around ?
④  got out ?
【单选题】 Our English teacher demanded that we ____ to English broadcast every day.
①  listening
②  would listen
③  listen
④  could listen
【单选题】 He ____ have left the campus, for I saw in the classroom just a minute ago
①  mustn’t
②  shouldn’t
③  couldn’t
④  oughtn’t
【单选题】 The manager will visit your parents ____ person. ?
①  in ?
②  by ?
③  of ?
④  for?