题目
阅读下列的程序
publicclassTest3{undefined
publicstaticvoidmain(String[]args){undefined
}
}
classOuter{undefined
staticclassInner{undefined
publicvoidmethod(){undefined
System.out.println(“method”);
}
}
}
下列选项中,可以正确输出method()方法的是()
A、Outero=newOuter();
o.method();
B、InnerI=newInner();
i.method();
C、Outer.Inneroi=newOuter.Inner();
C、oi.method();
D、以上答案都不对
第5题
下列不属于文字处理程序的是(1)。对文本进行阅读和修改,常常使用(2)程序。
A.WS
B.WPS
C.Edlin
D.Norton
第6题
阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写在对应栏内。
【说明】
阅读下面几段C++程序回答相应问题。
比较下面两段程序的优缺点。
①for (i=0; i<N; i++ )
{
if (condition)
//DoSomething
…
else
//DoOtherthing
…
}
②if (condition) {
for (i =0; i<N; i++ )
//DoSomething
}else {
for (i=0; i <N; i++ )
//DoOtherthing
…
}
第7题
阅读下列利用递归来求n!的程序。为保证程序正确运行,在下画线处应该填入的参数是()。
A.n-1
B.n-2
C.n
D.n+l
第9题
阅读下列程序片段。如果sayHello()方法正常运行,则test()方法的运行结果将是()。
A.Hello
B.ArrayIndexOutOfBondsException
C.ExceptionFinally
D.HelloFinally
第10题
一下程序找出50以内所有能构成直角三角形的整数组。阅读下列程序,并完成程序。
Private Sub Command1_Click()
For a=1 to 50
For b=a to 50
c=Sqr(a^2+b^2)
If【 】then print a;b;c
next b
next a
end Sub
c<=50 And c=Int?
第11题
阅读下列程序,则在执行后,程序的运行结果为 #include"stdio.h" #include"string.h" main() { char a[30]="nice to meet you!"; strcpy(a+strlen(a)/2,"you"); printf("%s\n",a);}
A.nice to meet you you
B.nice to
C.meet you you
D.nice to you
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!