题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-07-07 19:41:55

[单选题]运行结果是( ) switch ( ‘B’ ) {case ‘A’:printf("abc");break; case ‘B’:switch(1) {case 0:printf("a");break; case 1;printf("b");break; default:printf("c");break; } default:printf("x"); }
A.ax
B.bx
C.cx
D. dx

更多"[单选题]运行结果是( ) switch ( "的相关试题:

[简答题]以下程序运行结果是_(__。
Long fib (int g)
{ switch ( g )
{ case 0∶return 0;
case 1∶
case 2∶return 1;
}
return (fib(g-1)+fib(g-2));
}
Int main ( )
{ long k;
k=fib(5);
cout << "k="< return 0;
}
[单选题]有如下程序:
A=6:b=8
F=Sqr(a*a十b*b)
Print F
运行后输出的结果是().
A.6
B.8
C.10
D.14
[单选题]下面程序的运行结果是( )
Main()
{ int i,b,k=0;
For(i=1;i<=5;i++)
{ b=i%2;
While(b-->=0) k++; }
Printf("%d,%d",k,B.; }
A. 3,-1
B. 8,-1
C. 3,0
D. 8,-2
[单选题]
(单选题)以下代码的运行结果是(),var a="12px";var b=3;console.log(a+b);console.log(Number(a));
A.15px/12
B.12px3/12
C.15px/NaN
D.12px3/NaN
[单选题]下面程序段的运行结果是( )
Int a=1,b=2,c=2,t;
While(aPrintf("%d,%d,%d",a,b,C.;
A.1,2,0
B.2,1,0
C.1,2,1
D.2,1,1
[单选题]题 (1.0分)
如下程序.
运行的结果是().
Dim a%, b%, c%
Public Sub p1(x%, y%)
Dim c%
X = 2 * x. y = y + 2. c = c + y
End Sub
Public Sub p2(x%, ByVal y%)
Dim c%
X = 2 * x.. y = y + 2. c = x + y
End Sub
Private Sub Command1_Click()
A = 2. b = 4. c = 6
Call p1(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
Call p2(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
End Sub
A.a=2 b=4 c=6
A=4 b=6 c=10
B.a=4 b=4 c=10
A=8 b=8 c=16
C.a=4 b=6 c=6
A=8 b=6 c=6
D.a=4 b=6 c=14
A=8 b=8 c=6
[单选题]【单选题】
(单选题)以下代码的运行结果是(),var a="12px";var b=3;console.log(a+b);console.log(Number(a));
A.15px/12
B.12px3/12
C.15px/NaN
D.12px3/NaN
[单选题]下列程序的运行结果是: public class test{   private String[] data={"10","10.5"};   public void fun(){     double s=0;     for(int i=0;i<3;i++){       try{         s=s+Integer .parseInt(data[i]);       }catch(Exception e{         System.out.print("errorl:"+data[i]);       }     }   }   public static void main(String[]args){     try{       test d=new test();       d .fun();     }catch(Exception e){       System.out.println("error2");     }   } }
A.errorl:10.5
B.error2
C.errorl:10.5 error2
D.以上都不对
[单选题]下列程序的运行结果是:( ) #include using namespace std; int main() { int a=2; int b=a+1; cout<A.0.66667
B.0
C.0.7
D.0.6666666…
[单选题]下列程序编译或运行的结果是:()
Public static void main(String[] args) {
Int num = 100;
For(int i=0;i<=100;i++) {
Int num = 10;
}
System.out.println(num);
}
A. 10
B. 100
C. 201
D.编译不通过
[单选题]下列代码编译和运行的结果是:()
Public static void main(String[] args) {
String[] names = { "Oscar", "Edgar", "Frank", "Laurent","Hugo","Jacob", "Aaron", "Gino", "Angus", "Ken" };
System.out.println(names[10]);
}
A.编译错误
B.运行时抛出异常
C.输出:ken
D.输出:Angus
[单选题]编译并运行以下程序段的结果是:( )
Public class MyClass{
Final static int i;
MyClass(){i =0;}
Public static void main(String args[]){
System.out.println(i);
}
}
A.编译出错
B.null
C.1
D.0
[单选题] 下列代码段编译和运行的结果是:()
Public static void main(String[] args) {
For (int i = 0; i <= 10; i++) {
If (i > 6){
Break;
}
}
System.out.println(i);
}
A.输出 6
B.输出 7
C.输出 10
D.编译错误
[单选题]
(单选题)以下表达式的运行结果是()
Function sidEffecting(arr){
Arr[0] = arr[2];
}
Function bar(a,b,c){
C = 10;
SidEffecting(arguments);
Return a+b+c;
}
Bar(1,1,1);
A.3
B.12
C.报错
D.其他
[单选题]以下程序的运行结果是( )。
#include
Using namespace std;
Int main()
{
int x=1;
switch(x)
{ case 1:++x;
case 0:--x;
default: x+=7;
}
cout << x << endl;
return 0;
}
A. 2
B. 1
C. 7
D. 8
[单选题]以下程序运行后输出结果是( )
#include
Using namespace std;
Int
A,b;
Void f()
{ int x=20,y=25;
a=a+x+y;
b=b+x-y;
}
Int main()
{ int x=9,y=7;
a=x+y;b=x-y;
f();
cout << a << "," << b << endl;
return 0;
}
A. 61,-3
B. 16,2
C. 25,-5
D. 以上都不正确
[单选题]下面程序运行后,输出的结果是().
Private Sub Command1_Click()
S=0
For K=1 To 3
If K<=1 Then
x=1
ElseIf K<=2 Then
x=2
Elself K<=3 Then
x=3
Else
x=4
End lf
Print x;
S=S+x
Next K
Print S
End Sub
A.3 3 3 9
B.3 2 1 6
C.1 1 1 3
D.1 2 3 6

我来回答:

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

订单号:

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