下面程序段的输出结果是_______。public class Test{ public static void main(String args[]){ int n=5,sum=0; while(n>0){ sum+=n; --n; } System.out.println("sum is:"+sum); } }
A.sum is: 5
B.sum is:15
C.sum is:14
D.sum is:10
A.sum is: 5
B.sum is:15
C.sum is:14
D.sum is:10
第3题
A.以上答案均不正确
B.xyz
C.x+y+z
D.12
第4题
A.以上答案均不正确
B.xyz
C.x y z
D.12
第5题
A.输出空格
B.\0
C.e
D.f
第6题
A.-1
B.0
C.1
D.2
第7题
#include <string.h> void f(char *s,char *t) {char k; k=*s; *s=*t;*t=k; s++;t--; if(*s)f(s,t); } main() {char str[10]="abcdefg",*p; p=str+strlen(str)/2+1; f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是()。
A.gfedcba
B.gbcdefa
C.abedcfg
D.abcdefg
第8题
A.H\M
B.H\\\115
C.H115
D.无输出
第9题
A.There is one parameter.There is none parameter.There are two parameters.
B.There is none parameter.There is one parameter.There are two parameters.
C.There is none parameter.It’s good!There are tw
D.It’s good!There is none parameter.There are two parameters.
第10题
A.The result is:16 The result is:8.0
B.The result is:8.0 The result is:16
C.The result is:8 The result is:16.0
D.The result is:16.0 The result is:8
第11题
A.aceg
B.abcdefg
C.abcd
D.ACEG