单项选择题

(39)有以下程序
#include <stdio.h>
main()
{ int a=5,b=1,t;
t=(a<<2|b); printf(“%d/n”,t)
}
程序运行后的输出结果是
A)21 B)11 C)6 D)1

A.h>
main()
{
<上一题 目录 下一题>
热门 试题

单项选择题
(40)有以下程序#include <stdio.h>main(){ FILE *f;f=fopen(“filea.txt”,”w”);fprintf(f,”abc”);fclose(f);}若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为A) helloabc B)abclo C)abc D)abchello
A.h>
main()
{
B.txt”,”w”);
fprintf(f,”abc”);
fclose(f);
}
若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为
A)
单项选择题
(29)有以下程序#include <stdio.h>main(){ int s;scanf('%d',&s);while(s>0){ switch(s){ case1:printf('%d',s+5);case2:printf('%d',s+4); break;case3:printf('%d',s+3);default:printf('%d',s+1);break;}scanf('%d',&s);}}运行时,若输入1 2 3 4 5 0<回车>,则输出结果是A)6566456 B)66656 C)66666 D)6666656
A.h>
main()
{
相关试题
  • 当使用魔棒工具选择图像时,在“容差”数值...
  • 在拼合图层时,会将暂不显示的图层全部删除...
  • 显示与隐藏参考线快捷键是Ctrl+H()
  • 采用该战略有可能面临哪些障碍?如何解决?
  • From this passage we can learn tha...