重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 计算机应用技术> VB程序设计
网友您好,请在下方输入框内输入要搜索的题目:
搜题
拍照、语音搜题,请扫码下载APP
扫一扫 下载APP
题目内容 (请给出正确答案)
[主观题]

下列程序的运行结果为【 】。 void average(); main() { float score[3][4]={{65,67,70,60},{8

下列程序的运行结果为【 】。 void average(); main() { float score[3][4]={{65,67,70,60},{80,87,90,81},{90,99,100,99}}; average(*score,12); } void average(p,n) int n; float*p; { int i; float sum=0; for(i=0;i<n;i++,p++) sum+=(*p); printf("%.2f\n",sum/n); }

答案
查看答案
更多“下列程序的运行结果为【 】。 void average(); main() { float score[3][4]={{65,67,70,60},{8”相关的问题

第1题

下面程序段的运行结果为_______。public class OperatorsAndExpressions { void equalsMethod
1(){ int i=10,j=15; System.out.println(i==j); String s1=new String("how are you"); String s2=new String("how are you"); System.o

A.0 0

B.0 1

C.false false

D.false true

点击查看答案

第2题

下面的程序段运行结果为_______。public class ExampleStringBuffer { public static void ma
in(String args[]){ StringBuffer sb=new StringBuffer("test"); System.out.println("length="+sb.length()); System.out.println("charAt="+sb.charAt(3));

A.length=20 charAt=t

B.length=20 charAt=s

C.length=4 charAt=s

D.length=4 charAt=t

点击查看答案

第3题

关于下面程序,结论正确的是()。

public class J_Test {

public static void main(String[] args) {

int[] a = new int[5];

boolean[] b = new boolean[5];

System.out.println(a[4]);

System.out.println(b[5]);

}

}

A.程序可以通过编译并正常运行,结果输出“0false”

B.程序可以通过编译并正常运行,结果输出“1true”

C.程序无法通过编译

D.程序可以通过编译,但无法正常运行

点击查看答案

第4题

下列程序的功能是创建了一个显示5个"Hello!"的线程并启动运行,请将程序补充完整。 public cl
ass ThreadTest extends Thread{ public static void main(String args[ ]){ ThreadTest t = new【 】; t.start(); } public void run(){ int i =0; while(true){ System.out.println("Hello!"); if(i++==4) break; } } }

点击查看答案

第5题

编译执行下面的程序段,结果为_______。public class Test { public static void main(String args[]){ int i=0; while(1){ if(i==4){ break; } i++; } } }

A.4

B.5

C.3

D.不能通过编译

点击查看答案

第6题

下面程序段的输出结果为_______。public class Test { public static void main(String args
[]){ char c1,c2,c3; c1='H'; c2='\\'; c3='\115'; System.out.print(c1); System.out.print(c2); System.out.print(c3);

A.H\M

B.H\\\115

C.H115

D.无输出

点击查看答案

第7题

下面程序段的输出结果为_______。class OverMethod{ void printMeth(){ System.out.println(&
quot;There is none parameter."); } void printMeth(String t){ System.out.println("There is one parameter."); } void printMe

A.There is one parameter.There is none parameter.There are two parameters.

B.There is none parameter.There is one parameter.There are two parameters.

C.There is none parameter.It’s good!There are tw

D.It’s good!There is none parameter.There are two parameters.

点击查看答案

第8题

1下列程序的功能是创建了一个显示5个“Hello!”的线程并启动运行,请将程序补充完整。 public class
ThreadTest extends Thread{ public static void main(String args[ ]){ ThreadTest t=new【 】; t.start(); } public void run() { int i =0; while(true){ System.out.println("Hello!"); if(i++==4) break; }}}

点击查看答案

第9题

下面程序段的输出结果为_______。public class NewClass { public static void main(String a
rgs[]){ int x,y; x=(int)82.5; y=(int)'A'; System.out.print("x="+x); System.out.print("\ty="+y); } }

A.82 A

B.82 65

C.82.5 A

D.82.5 65

点击查看答案

第10题

下面程序段的输出结果为()。public class MethLoad {public static void main(String args[]
{MethLoad classObj=new MethLoad();classObj.methTest(4);classObj.methTest(4.0);}void methTest(double d){double sum=2*d};}

A.The result is:16 The result is:8.0

B.The result is:8.0 The result is:16

C.The result is:8 The result is:16.0

D.The result is:16.0 The result is:8

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝