题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-09-28 11:18:28

[填空题]下列程序段的输出结果为 ______。
int a=2;
switch (a)

case 2:
System.out.print("Value is 2.");
case 3:
System.out.println("Value is.");
break;
default:
System.out.println("end");
break;

更多"下列程序段的输出结果为 ______。 int a=2; swit"的相关试题:

[填空题]下列程序段的输出结果为__________。  int a=2;  switch (a)   case2:  System.out.print("Value is2.");  case3:  System.out.pritln("Value is3.");  break;  default:  System.out.println("end");  break:
[填空题]下列程序段的输出结果为【 】。 int a=2; switch(a) { case 2: System.out.print("Value is 2."); case 3 : System.out.println("Value is 3."); break; default: System.out.prinfln("end"); break; }
[填空题]下列程序段的输出结果为______。
int a=2;
switch(A)

case 2:
System.out.println("Value is 2.");
case 3:
System.out.println("Value is 3.");
break;
default:
System.out.println("end");
break;

[填空题]下列程序段的输出结果为 【8】
int a=2;
switch (a)
case 2:
System. out. print( "Value is 2.");
case 3 :
System. out. println( "Value is 3. ");
break;
default:
System. out. println ("end ");
break;

[填空题]下列程序段的输出结果为______。
int a=2;
switch(a)
case 2: System.out.println("Value is 2.");
case 3: System.out.println("Value is 3."); break;
default: System.out.println("end"); break;

[填空题]下列程序段的输出结果是______。
int n=’c’;
switch(n++)
default:printf("error");break;
case’a’:printf("good");break;
case’C’:printf("morning");
case’d’:printf("class");

[填空题]下列程序段的输出结果是______。
int n=’c’;
switch(n++)
default:printf("error");break;
case’a’:ease’A’:case’b’:case’B’:printf("good");break;
case’c’:case’C’:printf("pass");
case’d’:case’D’:printf("warn");

[填空题]下列程序段的输出结果是______。
int n=’C’;
switch(n++)
default:printf("error");break;
case’a’:printf("good");break;
case’C’:printf("moming");
case’d’:printf("class");

[填空题]下列程序段的输出结果是______。 int n=’C’; switch(n++) { default:printf("error");break; case’a’:printf("good");break; case’C’:printf("moming"); case’d’:printf("class"); }
[填空题]下列程序段的输出结果是 ______。
int n=’c’:
switch(n++)
default:printf("error");break;
case’a’:printf("good");break;
case’c’:printf("moming"); case’d’:printf("class");

[单项选择]

有以下程序段
int i,n;
for(i=0;i<8;i++)
{n=rand( )%5;
switch (n)
{ case 1:
case 3:printf("%d/n",n); break;
case 2:
case 4:printf("%d/n",n);continue;
case 0:exit(0);
}
printf("%d/n",n);
}
以下关于程序段执行情况的叙述,正确的是()。


A. for循环语句固定执行8次
B. 当产生的随机数n为4时结束循环操作
C. 当产生的随机数n为1和2时不做任何操作
D. 当产生的随机数n为0时结束程序运行
[填空题]下列程序的输出结果是 【10】 。 int t(int x,int y,int cp,int dp) { cp=x*x+y*y; dp=x*x-y*y; } main( ) { int a=4,b=3,c=5,d=6; t(a,b,c,d); printf("%d%d/n",c,d); }
[填空题]下列程序的输出结果是 【10】
int t(int x,int y,int cp,int dp)
cp=x*x+y*y;
dp=x*x-y*y;

main( )
int a=4,b=3,c=5,d=6;
t(a,b,c,d);
printf("%d%d/n",c,d);

[填空题]下列程序的输出结果是 【11】
int t(int x,int y,int cp,int dp)
cp=x* x+y*y;
dp=x*x-y*y;

main( )
int a=4,b=3,c=5,d=6;
t(a,b,c,d);
printf("%d%d/n",c,d);

[填空题]下列程序的输出结果是______。 int t(int x,int y,int cp,int dp) {cp=x% y+y*y; dp=x+x-y*y; } main( ) { im a=4,b=3,c=9,d=8; t(a,b,c,d); printf("%d%d/n",c,d); }
[单项选择]以下程序运行后的输出结果是 void swap(int x, int y) {int t; t=x;x=y;y=t; } main( ) {int a=15, b=16; swap(a, b); printf("% d % d", a, b); }
A. 15, 16
B. 16, 15
C. 15, 15
D. 16, 16

我来回答:

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

订单号:

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