题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-16 18:47:50

[单项选择]阅读下列FORTRAN77程序:
DIMENSIONA(3,3)
D0100K=1,3
D0100J=1,3
100A(K,J)=K+J
S=P(A,2,8)
WRITE(*,*)S
END
FUNCTIONP(B,M,N)
DIMENSIONB(N)
P=0.0
D010K=M,N
10P=P+B(K)
END
运行上述程序后,输出的S值为()。
A. 20.0
B. 24.0
C. 28.0
D. 32.0

更多"阅读下列FORTRAN77程序: DIMENSIONA(3,3) "的相关试题:

[单项选择]阅读下列FORTRAN77程序: DIMENSIONA(4,3) COMMON/P/A P=0.0 D010K=1,3 D010J=1,3 1F(P.LE.5.0)P=P+A(J,K) 10CONTINUE WRITE(*,*)P END BL( )CKDATAABC DIMENSIONB(4,3) COMMON/P/B DATAB/4*4.0,4*-3.0,4*2.0/ END 运行上述程序后,输出的P值为( )。
A. (8.0
B. (7.0
C. (5.0
D. (4.0
[单项选择]

阅读下列FORTRAN77程序:
DIMENSIONA(4,3)
COMMON/P/A
P=0.0
D010K=1,3
D010J=1,3
1F(P.LE.5.0)P=P+A(J,K)
10CONTINUE
WRITE(*,*)P
END
BL( )CKDATAABC
DIMENSIONB(4,3)
COMMON/P/B
DATAB/4*4.0,4*-3.0,4*2.0/
END
运行上述程序后,输出的P值为()。


A. 8.0
B. 7.0
C. 5.0
D. 4.0
[单项选择]请阅读下面程序
publicclassExampleStringBuffer
publicstaticvoidmain(String[]args)
StringBuffersb=newStringBuffer("test");
System.out.println("buffer-,"+sb);
System.out.println("longth="+sb.1ength( ));
程序运行结果中在“length”后输出的值是( )。
A. 10
B. 4
C. 20
D. 30
[单项选择]请阅读下面程序
publicclassThreadTest
publicstaticvoidmain(Stringargs[])throwsException
inti=0;
Hellot=newHello( );
______,
while(true)
System.out.println("GoodMoming"+i++);
if(i==2&&t.isAlive( ))
System.out.println("MainwaitingforHello!");
t.join( );//等待t运行结束

if(i==5)break;


classHelloextendsThread
inti;
publicvoidrun( )
while(true)
System.out.println("Hello"+i++);
if(i==5)break;
为使该程序正确执行, 下划线处的语句应是( )。
A. sleep()
B. yield()
C. interrupt()
D. start()
[单项选择]阅读下面程序
public class OperatorsAndExpressions
void equalsMethodl( )
String s1=new String("how are you");
String s2=new String("how are you");
System.out.println(s1==s2);

public static void main(String args[])
OperatorsAndExpressions OperAndExp=new OperatorsAndExpressions( );
OperAndExp. equalsMethod1( );


程序运行结果是( )。
A. ==
B. true
C. false
D. equal
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: public class throwsExcepfion{ static void Proc(int se1) throws ArithmeticException,ArraylndexOutOfBoundsException { System.out.println("in Situation"+se1); if(se1==0){ System.out.println("no Exception caught"); return; }else if(se1==1){ int iArray[]=new int[4]; iArray [1]=3; } } public static void main(String args[])[ try{ Proc(0); Proc(1); } catch(ArraylndexOutOfBoundsException e) { System.out.println("Catch"+e); }finally{ System.out.println("in Proc finally"); } } } 执行结果: In Situation( ) no ExcepbOn cauSht 【14】 in Proc findly
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
Public class throwsException
static voidProc(intsel)
throws ArtthmeticExcepdon,AITaylndexOut of BoundsException
System.out println("In SimatiOn"+Sel);
if(sel==0)
System.out.println("noExceptioncallght");
return;

elseif(sel==1)
intiArray[]=newint[4];
i Array[1]=3;


public static void main(Stringargs[])
tfy
Proc(0);
Proc(1);

catch(ArraylndexOutOfBoundsExceptione)
System.out.println("Catch"+e);

flnally
Systern.out.println("inProcfinally");



执行结果:
In Situattion 0
no Exceptioncaught
inProcfinally
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
public class throwsExcepfion
static void Proc(int se1)
throws ArithmeticException,ArraylndexOutOfBoundsException
System.out.println("in Situation"+se1);
if(se1==0)
System.out.println("no Exception caught");
return;
else if(se1==1)
int iArray[]=new int[4];
iArray [1]=3;


public static void main(String args[])[
try
Proc(0);
Proc(1);
catch(ArraylndexOutOfBoundsException e)
System.out.println("Catch"+e);
finally
System.out.println("in Proc finally");



执行结果:
In Situation( )
no ExcepbOn cauSht
【14】
in Proc findly
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
public class throwsException
static void Proc(int sel)
throws ArithmeticException,ArrayIndexOutOfBoundsException
System.out.println("In Situation"+sel);
if(sel==0)
System.out.println(’no Exception caught");
return;

else if(sel==1)
int iArray[]=new int[4];
iArray[1]=3;


public static void main(String args[])
try
Proc(0);
Proc(1);

catch(ArrayIndexOutOfBoundsException e)
System.out.println("Catch"+e);

finally
System.out.println("in Proc finally");



执行结果:
In Situation 0
no Exception caught
【14】
in Proc finally

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码