有以下程序: include<stclio.h> main() { char c; while((c=getchar())!=?)pu
有以下程序: include<stclio.h> main() { char c; while((c=getchar())!=?)putchar(--c); } 程序运行时,如果从键盘输入:Y?N?<回车>,则输出结果为【 】。
有以下程序: include<stclio.h> main() { char c; while((c=getchar())!=?)putchar(--c); } 程序运行时,如果从键盘输入:Y?N?<回车>,则输出结果为【 】。
第2题
有以下程序
#include<stdio.h>
#include<string.h>
main()
{char x[]=“STRING”;
x[0]=0;x[1]=’\0’;x[2]=’0’;
printf(”%d%d\n”,sizeof(x),strlen(x));
}
程序运行后的输出结果是()。
A.6 1
B.7 0
C.6 3
D.7 1
第3题
有以下程序 #include<stdio.h> main {int y=9; for(;y>0;y--) if(y%3==0)printf("%d",--y); } 程序的运行结果是()。
A.741
B.963
C.852
D.875421
第4题
有以下程序: #include<stdio.b> void fun(char c) { if(c>X)fun(c-1): printf("%C",c); } traia() { fun(z);} 程序运行后的输出结果是()
A.xyz
B.wxyz
C.xzy
D.zvx
第5题
有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y&~z); 程序运行后的输出结果是()。
A.3
B.2
C.1
D.0
第6题
A.6
B.8
C.12
D.10
第7题
(21 )有以下程序
# include (stdio.h >
main ()
{ int a = l ; b = 2 ;
for (; a < 8 ; a++ ) { b+=a ; a+=2 ; }
printf (" %d , %d \ n ", a , b ) ;
}
程序运行后的输出结果是
A ) 9 , 18
B ) 8 , 11
C ) 7 , 11
D ) 10 , 14
第8题
有以下程序:#include <stdio.h>main(){ int i,s=0,t[] = {1,2,3,4,5,6,7,8,9}; for(i=0;i<9;i+=2) s+=*(t+i); prinff("% d \n ",s);
A.45
B.20
C.25
D.36
第9题
有以下程序: #include<stdio.h> void fun(char *a,char*B){while(*a=='*')a++; while(*b=*A){b++;a++;} } main() {char*s="****a*b****",t[80]; fun(s,t);puts(t); } 程序的运行结果是()。
A.*****a*b
B.a*b
C.a*b****
D.ab
第10题
有以下程序
#include<stdio.h>
#define S(x)4*(x)*x+1
main()
{int k=5,j=2;
printf(“%d\n”,S(k+j));
}
程序运行后的输出结果是
A.197
B.143
C.33
D.28