有如下程序#includeusingnamespacestd;intmax(intx,inty){intz;if(x>y)z=x;elsez=y;returnz;}intmain(){inta=3,b=5;cout<<"max="<<max(a,b)<<endl;}
A.max=3
B.max=4
C.max=5
D.max=6
A.max=3
B.max=4
C.max=5
D.max=6
第4题
有如下的程序片段,该程序片段的执行完后,共执行循环______次。 Private Sub command1_ Click() total =0 Counter = 1 do Print Counter total = total + Counter Print total, "111" Counter = Counter + 1 if total >= 10 then exit do End if Loop while Counter <= 10 End Sub
第5题
有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: include <stdio.h> include "myfun.c" main() { fun(); prinff("\n"); } myfun.c文件如下: void fun() { char s[80],c;int n=0; while((c=getchar())! :\n) s[n++] =c; n--; while (n>=0) prinff("%c" , s [n--] ); } 当编译连接通过后,运行程序T18时,输入"Thank!”,则输出结果是【 】。
第6题
A.True与True
B.False与True
C.True与False
D.False与False
第7题
A.SUBSTR(学号,1,2)=′03′
B.SUBSTR(学号,2,2)=′03′
C.SUBSTR(学号,3,2)=′03′
D.SUBSTR(学号,4,2)=′03′
第9题
设有如下程序段:
intj=0,sum=1;
do{
sum+=j++;}
while(j<6);
printf("%d\n",sum);
上述程序段的输出结果是______。
第10题
若有如下程序: main() {int a[][2]={1,2,6,9,11},(*t)[2]; t=a; printf("%d,%d\n",*(t[1]+1), (*t) [1]); } 则程序运行后输出的结果是【 】。
第11题
若有如下程序: sub(int*y) {while(--(*y)); printf("%d",(*y)--);} main() { int x=10; sub(&x); } 则程序运行后的输出结果是【 】。