题目内容
(请给出正确答案)
[单选题]
有如下所示的Java程序段:int total = 0;for (int i = 0; i < 4; i++ ){if (i == 1) {continue;}if (i == 2){break;}total += i;}total的值最后是多少
A.0
B. 1
C. 3
D. 6
查看答案
如果结果不匹配,请 联系老师 获取答案
A.0
B. 1
C. 3
D. 6
A.True与True
B.False与True
C.True与False
D.False与False
已知含有4个元素的字节数组定义如下所示:
XA: DB x1,x2,x3,x4
试编写一个程序段,将其中的元素排列顺序颠倒过来。
有如下C语言源程序段 int m; m=33; printf("m=%d\n",m); 合法单词有哪些?
A.3,2,0
B.3,2,-1
C.4,3,-1
D.5,-2,-5
A.通过编译,但不能连接
B.有语法错,不能通过编译
C.输出** **
D.输出## ##
A.任意正奇数
B.任意负偶数
C.任意正偶数
D.任意负奇数
有两个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!”,则输出结果是【 】。
A. throws IOException
B. throw IOException
C. throws Exception
D. throws RuntimeException