题目详情
题目详情:
发布时间:2024-02-18 19:15:18

[单项选择]阅读下列FORTRAN77程序:DIMENSIONJA(3),JB(3,2)DATAJB/1,2,3,4,5,6/D010K=1,310JA(K)=JB(K,2)WRITE(*,100)JA100FORMAT(1X,611)END上述程序运行后,输出结果为()。
A. 123
B. 456
C. 135
D. 246

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

[单项选择]阅读程序: Option Base 1 Dim art( )As Integer Private Sub Form_Click( ) Dim i As Integer,j As Integer ReDim arr(3,2)  For i=1 To 3    For j=1 To 2     arr(i,j)=i*2+j    Next   Next ReDim Preserve ale(3,4)  For j=3 To 4    arr(3,j)=j+9  Next  Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为
A. 21
B. 13
C. 8
D. 25
[单项选择]阅读下面程序
import jav
A. io.*;
[简答题]下面是一段C程序,其功能为计算1到所输入数值的逐步累加和,请阅读程序并完成要求。
#include<stdio.h>
int sum(int);
void main( )

int num,k;
printf("Enter a number:");
seanf("%d",&num);
for(k=1;k<=num;k++)
printf("1 to %d is %d/n",k,sum(k));

int sum(int n)

int i,result=0;
for(i=1;i<=n;i++)
result+=i;
return result;

设计一组测试用例,使该程序所有函数的语句覆盖率和分支覆盖率均能达到100%。如果认为该程序的语句或分支覆盖率无法达到100%,说明原因。
[填空题]阅读程序: Sub p(b( ) As Integer) For i=1 To 4 b(i)=2*i Next i End 5ub Private Sub Command1_C1ick( ) Dima(1 To 4)As InteSer a(1)=5 a(2)=6 a(3)=7 a(4)=8 caU p(a) For i=1 To 4 Pdnt a(i) Next i End Sub 运行上面的程序,单击命令按钮,输出结果为【15】。
[单项选择]在会议上,由参会人员阅读程序,利用测试数据人工运行程序,对输出结果进行审查,以达到测试的目的。这种测试方法是()。
A. 软件审查
B. 代码走查
C. 技术评审
D. 代码审查
[单项选择]请阅读下面程序
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
[简答题]

以下是某C++程序,用来判定用户口令,请仔细阅读程序并完成要求。
//**********************************************************************//
// 口令检验程序 //
// //
// 文件名:password_check.cpp//
//*********************************************************************//
# incllide<iostream.h>
# include<string.h>
//*********************************************************************//
// 主函数 //
//*******************************************************************//
void main(void)

char.password[128]=’/o’;
cout<<"请输入您的口令:";
cout.flush( );
while(true)
cin.getline(password,128,’/n’);
if(strlen(password)<6)
//口令长度少于6位

cout<<"您的用户口令少于6个字符!"<<endl;
cout<<"请重新输入:";
cout.flush( );
else
bool capital=false;
//检验是否有大写字母
bool lowercase=false:
//检验是否有小写字母

[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
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
______
in Proc findly
[单项选择]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } } 输出结果是【 】
A. 5 6 6
B. 5 5 6
C. 6 7 7
D. 6 6 6
[单项选择]阅读下面程序
class Test implements Runnable
 public static void main(String[] args)
  Test t=new Test( );
  t.start( ):
 
 public void run( )

下列关于上述程序的叙述正确的是
A. 程序不能通过编译,因为start()方法在Test类中没有定义
B. 程序编译通过,但运行时出错,提示start()方法没有定义
C. 程序不能通过编译,因为run()方法没有定义方法体
D. 程序编译通过,且运行正常
[简答题]阅读下列程序,请写出该程序的输出结果。
class MyThread extends Thread
String message,int s;
MyThread(String message,int sec)this. message=message;s=sec;
public void run( )
trysleep(s);catch(InterruptedException e)
System. out. println(message+" "+getPriority( ));


class ThreadTest
public static void main(String args[])
Thread foo=new MyThread("Foo",1000);
foo. setPriority(Thread.MIN_PRIORITY);foo.start( );
Thread bar=new MyThread("Bar",800);
bar.setPriority(3);bar.start( );
Thread gar=new MyThread("Gar",400);
gar. setPriority(7);gar.start( );
Thread kar=new MyThread("Kar",100);
kar. setPriority(Thread.MAX_PRIORITY);kar.start( );


注:假设处理机中没有其他线程占用资源。
[单项选择]清阅读下面程序,说明该程序创建线程使用的方法是( )。
publicclassThreadTest

publicstaticvoidmain(Stringargs[])

Threadt1=newThread(newHolloWorld( ));
Threadt2=newThread(newHolloWorld( ));
t1.start( );
t2.start( );


classHolloWorldimplementsRunnable

inti;
publicvoidrun( )

while(true)

System.out.println("HolloWorld"+i++);
if(i==5)break;



A. 继承Thread类
B. 实现Runnable接口
C. t1.start()
D. t2.stan()
[填空题]bar为一JSerollBar组件,阅读下面程序段,请在程序中的画线处填入正确的语句使程序能够正确运行。

public WellAdjusted( )

super("Well Adjusted");
setSize(350,100);
bar.addAdjustmentListener(this);
value.setHorizontalAlignment(SwingConstants.CENTER);
value.setEditable(false);
JPanel pane=new JPane( );
pane.setLayout(new BorderLayout( ));

pane.add(value,"Center"):
pane.add(bar,"South");
setContentPane(pane);

public void adjustmentValueChanged(AdjustmentEvent evt)

【12】
if(source==bar)

int newValue bar.getValue( );
value.setText(""+newValue);

repaint( );


[单项选择]阅读下面程序
public class Increment
public static void main(stringargs[])
int c;
c=5:
System.out.println(c);
System.out.println(c++);
System.out.println(c);


程序运行结果是( )。
A. 5
B. 5
C. 6
D. 6
[简答题]阅读下列程序,请写出该程序的输出结果。
class Test33
String myString="1";
public static void main(String args[])
Test33 myObj=new Test33( );
myObj. stringModifier(myObj. myString);
System. out. println(" "+myObj. myString);

void stringModifier(String theString)
theString=theString+"2";System. out. print(theString);


[填空题]阅读下列程序,并写程序运行结果 [13]
#include<iomanip. h>
void main( )
for(int i=0;i<4;i++)
cout<<end1<<setfill(’ ’)<<setw(4-i)<< ’0’
<<setfill(’*’)<<setw(i+i)<<(i>0’ O’ : ’ ’ );

[简答题]阅读下列程序,请写出该程序的输出结果。
class Test32a
String name;int age;long number;
Test32a(long number,String name,int age)
System. out. println("Name:"+name);
System. out. println("Age:"+age);
System. out. println("Tel:"+number);


class Test32b extends Test32a
Test32b(long number,String name,int age,boolean b)
super(number,name,age);System. out. println("Married:"+b);


public class Test32
public static void main(String args[])
Test32b abc=new Test32b(4747,"Tony",29,true);


[填空题]阅读以下程序,此程序的功能是 [8]
#include<iostream.h>
void main( )

int n, i, j;
for(i=100;i<999; i+100)
for(j=i/100:j<=99;j=j+10)

n=i+j;
cout<<" "<<n;

cout<<"/n";

我来回答:

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

订单号:

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