以下代码的运行结果是什么? import tensorflow as tf with tf.variable_scope("a"): with tf.variable_scope("b"): c = tf.get_variable("c",[0]) print c.name
A.c
B.a/b/c
C.a/b/c:0
D.c:0
第1题:
下列程序运行后在立即窗口输出的结果是A=0Print A+1A=3 A.1 B.-1 C.3 D.0
第2题:
A、PYTHON
B、PYT
C、PYTH
D、PYTHON
第3题:
有以下程序:
#include<stdio.h>
main( )
{ int a=1,b=0;
if(--a)b++;
else if(a==0)b+=2;
else b+=3:
print[("%d\n",b);
}
程序运行后的输出结果是( )。
A.0
B.1
C.2
D.3
第4题:
有以下程序: #include<stdio.h> main( ) {int a=2,b=2,C=2; print{("%d\n",a/b&c); } 程序运行后的输出结果是( )。
A.0
B.1
C.2
D.3
第5题:
以下程序运行后输出的结果是______。 Private Sub Form. _Click() a=0 For j=1 To 15 a=a+j Mod 3 Next j Print a End Sub
A.10
B.15
C.80
D.100
第6题:
What’s the final result?
(下面这段代码的最终运行结果是什么)
double expectedValue = 1/2;
if(expectedValue > 0)
{
expectedValue = expectedValue + 0.5;
}
Console.WriteLine(expectedValue);
第7题:
运行以下的程序代码,结果是( )。 #include<iostream> using namespace std; intmain() { int x=5; int *q=&x; int &y=x; y++; tout<<(*q)++<<end1; return 0; }
A.5
B.6
C.7
D.8
第8题:
以下程序的运行结果是:( )
publicclassIncrement{
publicstaticvoidmain(Stringargs[]){
inta;
a=6;
System.out.print( );
System.out.print(a++);
System.out.print( );
}
}
A.666
B.667
C.677
D.676
第9题:
执行以下语句后显示结果为______。 Dim x As Integer If X Then Print x Else Print X-1
A.1
B.0
C.-1
D.不确定
第10题:
下面程序段运行后,显示结果是()。DimxIf x Then Print x Else Print x+1
第11题:
下列程序段:Dim x If x Then Print x Else Print x+1运行后,显示的结果是()。
第12题:
1
0
-1
出错
第13题:
下面Applet在窗口中实现一个不可编辑的TextField,并且显示“ok”。在横线处填入正确的语句。
import java.applet.Applet;
import java.awt.t;
public class Test extends Applet {
TextField tf;
public void init () {
setLayout (new GridLayout(1,0);
tf=new TextField("ok");
【 】
add(tf);
}
}
第14题:
阅读以下说明和C++码,将相应的文字填入(n)处,写在对应栏内。
[说明]
以下代码实现了对象引用作为函数参数,仔细阅读以下代码,分析运行结果,填入(n)处。
[代码]
include<iostream.h>
class Sample
{
int x,y;
public:
Sample() {x=y=0; }
Sample (int i, int j ) {x=i; y=j; }
void copy ( Sample &s ).,
void setxy ( int i, int j ) {x=i; y=j; }
void print ( {cout<<"x="<<x<<end1 ; cout <<"y="<<y<<end1;
};
void Sample: copy ( Sample &s )
{
X=S.X;
y=s.y;
}
void func ( Sample s1, Sample &s2 )
{
s1.setxy ( 10,20 );
s2.setxy ( 30,40 );
}
void main ( )
{
Sample p ( 1,2 ) ,q;
q.copy ( p );
time ( p,q );
p.print ( );
q.print ( );
}
运行结果
(1)
(2)
(3)
(4)
第15题:
编译和执行以下代码,输出结果是( )。 int i=1; switch (i) { case 0: System.out.print("zero,"); break; case 1: System.out.print("one,"); case 2: System.out.print("two,"); default: System.out.println("default"); }
A.one,
B.one,two,
C.one,two,default
D.default
第16题:
以下程序运行后的输出结果是______。 Private Sub Form_ Click() y=1 :x=2 Print Iif(x>=y,x,y) End Sub
A.0
B.1
C.2
D.3
第17题:
阅读以下说明和Java以及HTML代码,将应填入(n)处的字句写在对应栏内。
[说明]
编写一个Applet程序,接受HTML文件传递的整数参数,根据该参数指定Applet中文本框的长度。编写对应的HTML文件运行这个Applet。
[Java 代码]
import java. applet.*;
import java. awt.*;
public class chuangdics extends (1)
{
TextField tf=new TextField ();
int tfLength=0;
public void init()
{
try
{
tfLength=Integer. parseInt( (2) ("length"));
tf. setColumns (tfLength);
add (tf);
}
catch (NumberFormatException nfe)
{
tf. (3) ("HTML 文件传人的参数格式错误。");
add(tf);
}
}
}
[HTML 代码]
<html>
<head>
<title>(4)</title>
</head>
<body>
<hr>
<applet code=chuangdics width=700 height=150>
<param name=length value=20>
(5)
<hr>
</body>
</htmI>
第18题:
有以下程序: #include <stdio.h> main( ) { int a=7; while(a--); print[("%d\n",a); } 程序运行后的输出结果是( )。
A.-l
B.0
C.1
D.7
第19题:
以下程序段运行时从键盘上输入字符“-”,则输出结果为 op$=InputBox("op=") If op$="+" Then a=a+2 If op$="-" Then a=a-2 Print a
A.2
B.-2
C.0
D.+2
第20题:
给定以下JAVA代码,这段代码编译运行后输出的结果是( )
publicclassTest{
publicstaticintaMethod(inti)throwsException{
try{
returni/10;
}catch(Exceptionex){
thrownewException("exceptioninaaMothod");
}finally{
System.out.print("finally");
}
}
publicstaticvoidmain(String[]args){
try{
aMethod(0);
}catch(Exceptionex){
System.out.print("exceptioninmain");
}
System.out.print("finished");
}
}
A、finallyexceptioninmainfinished
B、exceptioninmainfinally
C、finallyfinished
D、finallyexceptioninmainfinished
第21题:
以下的C#代码:static void Main(string[]args){Console.WriteLine("运行结果:{0}",Console.ReadLine());Console.ReadLine();}代码运行结果为()。
第22题:
"假设x=2.3456,则执行代码Print Format(x,""00##.0%"")后窗体上的结果为()。"
第23题:
0
1
-1
显示出错信息
第24题:
在控制台窗口显示“运行结果:”
在控制台窗口显示“运行结果:{0}”
在控制台窗口显示“运行结果:,Console.ReadLine”
如果用户在控制台输入“A”,那么程序将在控制台显示“运行结果:A”