给出下面的代码段:()。publicclassBase{undefinedintw,x,y,z;publicBase(inta,intb){x=a;y=b;}publicBase(inta,intb,intc,intd){undefined//assignmentx=a,y=bw=d;z=c;}}在代码说明//assignmentx=a,y=b处写下如下哪几个代码是正确的?()
A.Base(a,b);
B.x=a,y=b;
C.x=a;y=b;
D.this(a,b);
A.Base(a,b);
B.x=a,y=b;
C.x=a;y=b;
D.this(a,b);
A.21
B.19
C.2,4,4,5,6
D.24456
A.1 2 3
B.3 2 4
C.0 1 2
D.1 2 4
中断是嵌入式系统中重要的组成部分,这
导致了很多编译开发商提供一种扩展—让标准C
支持中断。具代表事实是,产生了一个新的关键字
__interrupt。下面的代码就使用了__interrupt关键字
去定义了一个中断服务子程序(ISR),请评论一下这
段代码的。
__interrupt double compute_area (double
radius)
{
double area = PI * radius * radius;
printf(" Area =%f", area);
return area;
}
分析下面的C#代码,该程序的运行结果是()。classExample{staticstrings1;staticstring
s2;staticvoidMain(stringDargs){s2=s1+s2;Console.WriteLine(s2);}}
A.代码编译失败
B.运行时错误,抛出NullPointerException异常
C.打印输出nullnull
D.代码编译成功,打印输出内容为空白行
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringQ
args){Console.WriteLine("/Looklikeacomment");}}
A.LookslikeA.comment
B./LookslikeA.comment
C.没有输出任何内容
D.编译错误
请把下面的表格转换为HTML代码。
其中,要求页面背景色为白色,网页标题为“列车时刻表”,表宽500pix,表的第一行为头表元,单元格内容居中,字体大小为5pt.
分析下面的C#代码,该程序的运行结果是()。classExample{staticvoidMain(stringO
args){(newExample).myMethod(;}voidmyMethod(){intxy;x=5;y=3;Console.Write("(*+x+","+y+'));switchCoords(x.y);Console.Write("("+x+"+y+")");}voidswitchCoords(intX,inty){inttemp;temp=x;y=temp;Console.Write("+x+"+y+")");}}
A.打印输出(5,3)(5,5)(5,3)
B.打印输出(5,3)(3,5)(3,5)
C.打印输出(5,3)(3,5)(5,3)
public void Test() {
try {
method();
System.out.println("Hello World");
}
catch (ArrayIndexOutOfBoundsException e)
{
System.out.println("Exception?");
}
catch(Exception e)
{
System.out.println("Exception1");
}
finally{
System.out.println("Thank you!");
}
}
如果函数method正常运行并返回,会显示下面的哪些信息?()
A.Hello World
B.Exception
C.Exception1
D.Thank you!