在下列程序中: Program test(input,output); var i,j:integer; procedure calc(p1,p2:integer); begin p2:=p2*p2 p1:=p1-p2;p2:=p2

admin2019-03-04  24

问题 在下列程序中:
   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、0
B、3
C、5
D、6
E、16

答案E

解析
转载请注明原文地址:https://jikaoti.com/ti/Qix7FFFM
0

相关试题推荐
最新回复(0)