单项选择题

当输入为"Fool&Swalow"时,下面程序的执行结果是( )。 #include<stdio.h> main() {char c; while(c!='') { c=getchar(); putchar(C) ; } }

A.Swalow
B.Fool
C.Fool
D.Swalow
<上一题 目录 下一题>
热门 试题

单项选择题
请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) { static int i=0; do {b[i]+=b[i+1]; }while(++i<2);} main() { int k,a[5]={1,3,5,4,9}; fun(a); for(k=0;k<5;k++)printf( %d ,a[k]);} 上面程序的输出是( )。
A.13579
B.48579
C.48549
D.48999
单项选择题
若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是( )。
A.switch(x) {case 1.0:printf("*\n"); case 2.0:printf("**\n");}
B.switch((int)x); {case 1:printf("*\n"); case 2:printf("**\n");}
C.switch(a+b) {case 1:printf("*\n"); case 2+1:printf("**\n");}
D.switch(a+b) {case 1:printf("*\n"); case c:printf("**\n");)
相关试题
  • 以下程序的功能是将字符串s中所有小写字母...
  • 下面程序运行后的输出结果是______。...
  • 下面程序的运行结果是______。#defi...
  • 下面程序的运行结果是______。#incl...
  • 以下程序的输出结果是______。#incl...