首页 > 软考
题目内容 (请给出正确答案)
[主观题]

在下列程序中: Program test(input, output); var i. j:integer; procedure calc(p1, p2: intege

在下列程序中:

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

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“在下列程序中: Program test(input, ou…”相关的问题
第1题
●在下列程序中:Program test(input,output);var i.j:integer;procedure calc(p1,p2:integer);beg

●在下列程序中:

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

点击查看答案
第2题
●在下列程序中:Program test(input,output);var i,j:integer;procedure calc(p1,p2:integer);beg

●在下列程序中:

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.10

B.16

C.20

D.28

(35) A.0

B.3

C.5

D.6

(36) A.数组

B.栈

C.队列

D.循环链表

(37) A.数组

B.两者相同

C.循环优于递归

D.递归优于循环

点击查看答案
第3题
下列程序实现对ZIP文件file.zip中的检索,在横线处填入正确的语句package test;import java.io.*;

下列程序实现对ZIP文件file.zip中的检索,在横线处填入正确的语句 package test; import java.io.*; import java.util.*; import java.util.zip.*; public class Exam { public static void main(String[]args){ try{ FilelnputStream fis=new FilelnputStream(”test/file.zip”); ZipInputStream zis=new ZipInputStrealn(fis); ZipEntry en; while((____)!=null){ en.getname(); zis.CloseEntry(); } zis.close(); } catch(Exception e){ e.printStackTrace() } } }

A.en=zis.getNextEntry()

B.en==zis.getNextEntry()

C.en=zis.getEntry()

D.zis.getNextEntry()

点击查看答案
第4题
下列叙述中正确的是()。(A)完整的FORTRAN77程序的第一个语句必须是PROGRAM语句(B)完整的FORTRAN77

下列叙述中正确的是()。

(A)完整的FORTRAN77程序的第一个语句必须是PROGRAM语句

(B)完整的FORTRAN77程序中只能有一个END语句

(C)FORTRAN77的任何可执行语句都可以有标号

(D)FORTRAN77的所有语句都是可执行语句

点击查看答案
第5题
Programmers test a program by running it to ensure that the(74)are correct and that the pr

Programmers test a program by running it to ensure that the(74)are correct and that the program produces the desired outcome. If errors do occur, the programmer must make the appropriate change and recheck the program until it produces the correct results. This(75)is called testing and debugging.

A.commands

B.software

C.instructions

D.measure

点击查看答案
第6题
下列程序test类中的变量e的最后结果为()。public class test{ public static void main (String a

下列程序test类中的变量e的最后结果为()。 public class test { public static void main (String args[]) { int a=10; int b; int c; if(a>50) { b=9; } c=b+a; } }

A.10

B.0

C.19

D.编译出错

点击查看答案
第7题
已知程序中已经定义了函数test,其原型是int test(int,int,int);,则下列重载形式中正确的是

A.char test (int,int,int);

B.double test(int,int,double);

C.int test(int,int,int=O);

D.float test(int,int,float=3.5F);

点击查看答案
第8题
下列说法错误的是()

A.软件的安装位置一定是C:\Program Files文件夹

B.软件的安装位置默认是C:\Program Files文件夹,但可以更改位置

C.很多软件的安装包中包含setup.exe,该文件通常就是安装文件

D.通过控制面板的卸载或更改程序可以卸载或修复软件

点击查看答案
第9题
(27 )下列程序段中包含 4 个函数,其中具有隐含 this 指针的是int fun1();class Test{public:int

(27 )下列程序段中包含 4 个函数,其中具有隐含 this 指针的是

int fun1();

class Test{

public:

int fun2();

friend int fun3();

static int fun4();

};

A ) fun1

B ) fun2

C ) fun3

D ) fun4

点击查看答案
第10题
下列程序实现对ZIP文件file.zip的检索,在横线处填入正确的语句package test;import java.io.*:im

下列程序实现对ZIP文件file.zip的检索,在横线处填入正确的语句 package test; import java.io.*: import java.util.*; import java.util.zip.*; public class Exam { public static void main(String[])args){ try{ FileInputStream fis=new FileInputStream("test/file.zip"); ZipInputStreamzis=new ZipInputStream(fis); ZipEntry en; while ((_____)!=null){ en.getName(); zis.closeEntry(); } zis.close(); } catch(Exception e) { e.printStackTrace(); } } }

A.en = zis.getNextEntry()

B.en = zis.getNextEntry()

C.en = zis.getEntry()

D.zis.getNextEntry()

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改