更多"[单选题]下面代码的输出结果是?( )。For i in range"的相关试题:
[单选题]下面代码的输出结果是?( )。
For i in range(1,6):
If i%3 == 0:
Break
Else:
Print(i,end=",")
A.1,2,3,4,5,
B.1,2,3,
C.1,2,3,4,5,6
D.1,2,
[单选题]分析下面的 Javascript 代码段,输出结果是()
var mystring=”I am a student”;
var a=mystring.substring(9,13);
document.write(a);
A.stud
B.tuden
C.uden
D.udent
[单选题]分析下面的JavaScript代码段,输出结果是( )
var mystring="I am a student";
a=mystring.charAt(9);
document.write(a);
A.I am a st
B.U
C.Udent
D.T
[单选题]分析下面的JavaScript代码段,输出的结果是( )。
emp=new Array(5);
emp[1]=1;
emp[2]=2;
document.write(emp.length);
A.2
B.3
C.4
D.5
[单选题]分析下面的 Javascript 代码段,输出结果是()
var s1=parseInt(“101 中学”);
document.write(s1);
A.NaN
B.101 中学
C.101
D.出现脚本错误
[单选题]分析下面的JavaScript代码段,输出结果是哪一项? var s1 = parseInt("101中学"); document.write(s1);
A.NaN
B.101中学
C.101
D.出现脚本错误
[单选题]假设今天是2006年4月1日星期六,请问以下javascript代码输出结果是:( )
var time = new Date( );
document.write(time.getMonth( ));
A.3
B.4
C.5
D.2
[单选题]下面这个 JS 程序的输出是什么:
function Foo() {
var i = 0;
return function() { console.log(i++);
}
}
var f1 = Foo(),
f2 = Foo();
f1();
f1();
f2();
A.0 1 0
B.0 1 2
C.0 0 0
D.0 0 2
[单选题]如下代码输出的结果是什么:
console.log(1+ "2"+"2");
console.log(1+ +"2"+"2");
console.log("A"- "B"+"2");
console.log("A"- "B"+2);
A.122 122 NaN NaN
B.122 32 NaN NaN2
C.122 32 NaN2 NaN
D.122 32 NaN2 NaN2
[单选题]下面的程序段运行后,输出结果是 ( )。
int i,j,x=0;
static int a[8][8];
for(i=0;i<3;i++)
for(j=0;j<3;j++)
a[i][j]=2*i+j;
for(i=0;i<8;i++)
x+=a[i][j];
printf("%d",x);
A.9
B.不确定值
C.0
D.18
[单选题]下列代码的输出结果是 : ( )
class Parent{
void printMe() {
System.out.println("parent");
}
};
class Child extends Parent {
void printMe() {
System.out.println("child");
}
void printall() {
super.printMe();
this.printMe();
printMe();
}
}
public class Test_this {
public static void main(String args[]) {
Child myC=new Child();
myC.printall();
}
}
A.parent
child
child
B.parent
child
parent
C.parent
child
D.编译错误
[多选题]下面属于输出设备的有( )。(易)(基础知识)
A.打印机
B.显示器
C.绘图仪
D.键盘
[单选题]下面代码中的内部类名是:
import java.awt*;
import javax.swing.*;
class TalkingClock {
public static void main(int interval,final boolean beep) {
ActionListener listener = new ActionListener(){
public void actionPerformed(ActionEvent event){
............
}
}
Timer t = new Timer(interval,listener);
t.start();
}
}
A.Timer
B.ActionListener
C.listener
D.匿名
[单选题]输入为n 位二进制代码的译码器输出端个数为( )。
A.n2 个
B.2n 个
C.2n 个
D.n 个
[单选题]以下程序的输出结果是()。
main()
{ int i,j,x=0;
for(i=0;i<2;i++)
{ x++;
for(j=0;j<3;j++)
{ if(j%2)continue;
x++;
}
x++;
}
printf("x=%d\n",x);
}
A.x=4
B.x=8
C.x=6
D.x=12