r=2 s=4 t=6
r=2 s=4 t=14
r=6 s=8 t=6
r=6 s=8 t=14
第1题:
Aprogram a1
Bprogram a1(output)
Cprogram(input,output)
Dprogram a1(inputoutput)
第2题:
请分析下列程序。 int main() { printf("This is in main program"); if(fork()==0) printf("I am in child process"); else printf("I am in parent process");} 程序正确运行后结果是
A.This is in main program I am in child process I am in parent process
B.This is in main program I am in child process
C.This is in main program I am in parent process
D.This is in main program I am in child process This is in main program I am in parent process
第3题:
有下列程序 program test(input,output); var s:integer; ch:char; count:array[‘a‘..‘z‘]of integer; begin for ch:=‘a‘to‘z‘do count[ch]:=0; read(ch); while not eoln do begin if(ch>=‘a‘)and(chx[5])and(x[c]/c0) or not(x[a+b]>(a+b))的值是( )。
Atrue
Bfalse
C0
D1
第4题:
下面程序运行的结果是( )。 #include<iostream> using namespace std; class A{ protected: int a; public: void input(int i) {a=i;} }; class B{ protected: int a; public: void input(int j) {a=j;} }; class C: public A, public B { int x; public: void input() {x=A::a * B::a;cout<<x<<endl;} }; void main() { C c; c.A::input(5); c.B::input(8); c.input(); }
A.5
B.8
C.40
D.编译出错
第5题:
请分析下面的程序并给出该程序的执行结果【 】。
include <iostream>
class AA {
int a;
public:
AA() {cout<<" Initializing AA!\n" ; }
AAM() {cout<<" Destroying AA!\n" ;
};
class BB {
int b;
AA p;
public:
BB() {cout<<"Initializing BB!\n" ;
~BB() {cout<<"Destroying BB!\n" ;
};
void main() {
BB X;
cout<<"Ending main!\n' ;
}
第6题:
两个连续的质控结果同时超过均值+2s或均值-2s,该规则为
A.12s
B.13s
C.22s
D.R4s
E.41s
一个质控结果超过均值+2s,另一个质控结果超过均值-2s,该规则为
A.12s
B.13s
C.22s
D.R4s
E.41s
请帮忙给出每个问题的正确答案和分析,谢谢!
第7题:
为了从当前文件夹中读人文件Filel.txt,某人编写了下面的程序:
Private Sub Commandl_Click()
Open“Filel.txt”For Output As#20
Do While NOt EOF(20)
Line Input#20,ch$
print ch
Loop
Close#20
End Sub
程序调试时,发现有错误,下面的修改方案中正确的是
A.在Open语句中的文件名前添加路径
B.把程序中各处的“20”改为“1”
C.把Print ch语句改为Print#20,ch
D.把Open语句中的Output改为Input
第8题:
A567 563
B567 567
C567 167
D567 163
第9题:
在J2EE中,下面的代码中出现编译错误的是()。
A.Filef=newFile("/","autoexec.bat");
B.DataInput Streamdin=new Data Input Stream(new File Input Stream("autoexec.bat"));
C.Input Stream Readerin=new Input Stream Reader(System.in);
D.Output Stream Writer out=new Output Stream Writer(System.in);
第10题:
在下列程序中:
Program test(input, output);
var i. j:integer;
procedure calc(p1, p2: integer);
beginp2: = p2 * p2 p1: = p1 - p2; p2: = p2 - p1; end {caic}
begin {main} i: =2;j:=3;
calc(i,j); write(j);
end {main}
当参数传递采用引用方式(Call by reference)时,所得结果j=(6);
当参数传递采用换名方式(Call by name)时,所得结果,j=(7);
当参数传递采用赋值方式(Call by value)时,所得结果,j=(8)。
A.3
B.6
C.10
D.16