网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

●在下列程序中:

Program test(input,output);

var i.j:integer;

procedure calc(p1,p2:integer);

beginp2:=p2*p2 pl:=pl-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) 。

(6) A.3

B.6

C.10

D.16

(7) A.3

B.6

C.10

D.16

(8) A.3

B.6

C.10

D.16


参考答案

更多 “ ●在下列程序中:Program test(input,output);var i.j:integer;procedure calc(p1,p2:integer);beginp2:=p2*p2 pl:=pl-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) 。(6) A.3B.6C.10D.16(7) A.3B.6C.10D.16(8) A.3B.6C.10D.16 ” 相关考题
考题 有下列程序 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))的值是( )。AtrueBfalseC0D1

考题 program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为(). A567 563B567 567C567 167D567 163

考题 ●在下列程序中:Program test(input,output);var i,j:integer;procedure calc(p1,p2:integer);begin p2:=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= (33) ;当参数传递采用换名方式(Call by name)时,所得结果j= (34) ;当参数传递采用赋值方式(Call by value)时,所得结果j= (35) ;递归是程序设计中很重要的一种控制结构,通常实现递归时,采用的数据结构是 (36) 。对那些既可以用递归方式,也可以用循环方式求解的问题,就执行效率而言 (37) 。(33) ,(34) A.10B.16C.20D.28(35) A.0B.3C.5D.6(36) A.数组B.栈C.队列D.循环链表(37) A.数组B.两者相同C.循环优于递归D.递归优于循环

考题 以下所列的各函数首部中,正确的是A.void play(var :Integer,var b:Integer)B.void play(int a,b)C.void play(int a,int b)D.Sub play(a as integer,b as integer)

考题 在下列程序中:Program test(input,output);var i,j:integer;procedure calc(p1,p2:integer);begin p2:=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=(16);当参数传递采用换名方式(Call by Name)时,所得结果j=(17):当参数传递采用赋值方式(Call by Value)时,所得结果j=(18)。递归是程序设计中很重要的一种控制结构,通常实现递归时,采用的数据结构是(19)。对那些既可以用递归方式,也可以用循环方式求解的问题,就执行效率而言(20)。A.0B.3C.5D.6E.16

考题 在下列程序中;Program test(input, output);var i, j: integer;procedure calc(p1, p2:integer);begin p2:=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=(33);当参数传递采用换名方式(Call by name)时,所得结果j=(34);当参数传递采用赋值方式(Call by value)时,所得结果j=(35);递归是程序设计中很重要的一种控制结构,通常实现递归时,采用的数据结构是(36)。对那些既可以用递归方式,也可以用循环方式求解的问题,就执行效率而言(37)。A.10B.16C.20D.28

考题 以下所列的各函数首部中,正确的是______。A.void play(var:Integer,var b:Integer)B.void play(int a,b)C.void play(int a,int b)D.Sub play(a as integer,b as integer)

考题 在下列程序中: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.3B.6C.10D.16

考题 下列各函数首部中,正确的是()。A.void play(var :Integer, var b:Integer)B.void play(int a, b)C.void play(int a, int b)D.Sub play(a as integer, b as integer)