The output may be “r1 = 6, r2 = 14”.
The output may be “r1 = 5, r2 = 15”.
The output may be “r1 = 8, r2 = 12”.
The code may run (and complete) with no output.
The code may deadlock (without completing) with no output.
M IllegalStateException or InterruptedException may be thrown at runtime.
第1题:
有以下程序: #include<iostream> using namespace std; class R { public: R(int r1,int r2) { R1=r1; R2=r2; } void print(); void print0const; private: int R1,R2; }; void R::print() { cout<<R1<<","<<R2<<endl; } void R::print() const { cout<<Rl<<","<<R2<<endl; } int main() { R a(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是( )。
A.5,4
B.20,52
C.0,0
D.4,5
第2题:
有以下程序: #include <iostream> using namespace std; class R { public: R(int f1,int r2) { R1=r1; R2=r2; } void print(); void print ()const; private: int R1, R2; }; void R: :print() { cout<<R1<<", "<<R2<<end1; } void R: :print() const { cout<<Rl<<", "<<R2<<end1; } int main () { R a(5,4); const R b(20,52); b.print (); return 0; } 执行后的输出结果是
A.5,4
B.20,52
C.0,0
D.4,5
第3题:
有以下程序
#include <iostream>
using namespace std;
class R
{
public:
R(int r1,int r2)
{
R1=r1;
R2=r2;
}
void print();
void print()const;
private:
iht R1,R2;
};
A.5,4
B.20,52
C.0,0
D.4,5
第4题:
有阻值分别为R1和R2的两个负载,其中R1的电阻值是R2的N倍,把它们并联后接到电源上,则:(”x^m”表示“x的m次方”)()
第5题:
Routers R1 and R2 are EIGRP neighbors. R1 has been configured with the eigrp stub connected command. Which of the following is true as a result?()
第6题:
public class Transfers { public static void main(String[] args) throws Exception { Record r1 = new Record(); Record r2 = new Record(); doTransfer(r1, r2, 5); doTransfer(r2, r1, 2); doTransfer(r1, r2, 1); // print the result System.out.println(”rl = “ + r1.get() +“, r2=” + r2.get()); } private static void doTransfer( final Record a, final Record b, final int amount) { Thread t = new Thread() { public void run() { new Clerk().transfer(a, b, amount); } }; t.start(); } } class Clerk { public synchronized void transfer(Record a, Record b, int amount){ synchronized (a) { synchronized (b) { a.add(-amount); b.add(amount); } } } } class Record { int num=10; public int get() { return num; } public void add(int n) { num = num + n; } } If Transfers.main() is run, which three are true?()
第7题:
极性最大的是()
第8题:
public class Test { public static void aMethod() throws Exception { try { throw new Exception(); } finally { System.out.println(“finally”); } } public static void main(String args[]) { try { aMethod(); } catch (Exception e) { System.out.println(“exception”); } System.out.println(“finished”); } } What is the result?()
第9题:
public class Starter extends Thread { private int x= 2; public static void main(String[] args) throws Exception { new Starter().makeItSo(); } public Starter() { x=5; start(); } public void makeItSo() throws Exception { join(); x=x- 1; System.out.println(x); } public void run() { x *= 2; } } What is the output if the main() method is rum?()
第10题:
两个电阻R1和R2做串联连接,当R1和R2具有以下数值时,试求串联的等效电阻: ①R1=R2=1Ω;②R1=3Ω,R2=6Ω。
第11题:
The output may be “r1 = 6, r2 = 14”.
The output may be “r1 = 5, r2 = 15”.
The output may be “r1 = 8, r2 = 12”.
The code may run (and complete) with no output.
The code may deadlock (without completing) with no output.
M IllegalStateException or InterruptedException may be thrown at runtime.
第12题:
0, 2, 4, 4, 6, 8, 10, 6,
0, 2, 4, 6, 8, 10, 2, 4,
0, 2, 4, 6, 8, 10, 12, 14,
0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14,
0, 2, 4, 6, 8, 10, 12, 14, 0, 2, 4, 6, 8, 10, 12, 14,
第13题:
有以下程序; #include <iostream> using namespace std; class R { public: R(int r1,int r2) { R1=r1; R2=r2; } void print(); void print () const; private: int R1, R2; }; void R::print () { cout<<R1<<","<<R2<<endl; } void R::print() const { cout<<R1<<", "<<R2<<endl; } int main () { R a(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是
A.5,4
B.20,52
C.0,0
D.4,5
第14题:
听力原文:[解析]
有以下程序: #include<iostream> using namespace Std; Class R {public: R(int r1,int r2) {R1=r1; R2=r2;} void print(); void print()const; private: int R1,R2;}; roid R::print() {cout<<R1<<“,”<<R2<<endl;} void R::print()con
A.5,4
B.20,52
C.0,0
D.4,5
第15题:
有阻值分别为R1和R2的两个负载,其中R1的电阻值是R2的N倍,把它们并联后接到电源上,则:(”x^m”表示“x的m次方”)()
第16题:
计算题:两个电阻R1和R2并联连接,当R1和R2具有下列数值时,试求并联的等效电阻。①R1=R2=2Ω;②R1=2Ω,R2=0。
第17题:
Two directly connected routers, R1 and R2, are both configured for OSPF graceful restart. R2 is able to switch packets in hardware, but R1 is not. If a network administrator logs on to R2 and performs a system reload, which will be the result?()
第18题:
class TestA { public void start() { System.out.println(”TestA”); } } public class TestB extends TestA { public void start() { System.out.println(”TestB”); } public static void main(String[] args) { ((TestA)new TestB()).start(); } } What is the result?()
第19题:
以下ARM指令中不属于数据处理类指令的是()
第20题:
public class Threads 1 { intx=0; public class Runner implements Runnable { public void run() { int current = 0; for(int=i=0;i<4;i++){ current = x; System.out.print(current + “, “); x = current + 2; } } } public static void main(String[] args) { new Threads1().go(); } public void go() { Runnable r1 = new Runner(); new Thread(r1).start(); new Thread(r1 ).start(); } } Which two are possible results?()
第21题:
电阻R1,R2并联,已知R1>>R2,并联后的等值电阻近似等于R1,即R≈R1。
第22题:
ADD R1,R2,R2
ORR R1,R2,R2
MOV R1,R2,LSL#1
MUL R1,R2,#2
第23题:
Traffic forwarded from R2 to or through R1 will continue to be forwarded based on the forwarding table state at the time of the reload.
R2 will continue to forward traffic to R1, but R1 will drop the traffic because its neighbor adjacency with R2 has failed.
R2 will continue forwarding traffic to and through R1, but R1 will drop this traffic because it is not capable of maintaining its forwarding state.
All the traffic R2 is forwarding to or through R1 will be dropped while OSPF rebuilds its neighbor adjacency and forwarding tables.
第24题:
finally
exception finished
finally exception finished
Compilation fails.