题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-11 04:41:31

[单项选择]下列程序执行的结果为
x=25:y=20: z=7
Print"S(";x+2*y;")"
A. S(47) B) S(165) C) S(25+7*20) D) S(87)

更多"下列程序执行的结果为 x=25:y=20: z=7 Print'S"的相关试题:

[单项选择]下列程序执行结果是
#include <iostream.h>
class A
public:
int a;
A( ):a(10)cout<<a<<endl;
;
void main( )
A obj1;
A obj2(obj1);
cout<<" "<<obj2.a<<endl;

A. 10 10
B. 编译错误缺少拷贝构造函数
C. 10随机数
D. 随机数随机数
[填空题]在下面程序的横线处填上适当的语句,使该程序执行结果为10。 #include <iostream> using namespace std; class MyClass { public: MyClasS(int A) { X=a; } 【13】 //取x的值 private: int x; }; int main( ) { MyClass my(10); cout<<my.GetNum( )<<end1; return 0; }
[填空题]在下面程序的横线处填上适当的语句,使该程序执行结果为10。
#include <iostream>
using namespace std;
class MyClass

public:
MyClasS(int A)

X=a;

【13】 //取x的值
private:
int x;

int main( )

MyClass my(10);
cout<<my.GetNum( )<<end1;
return 0;

[单项选择]以下程序执行结果是 ( )。 #include <iostream.h> class Base { public virtual void fun( ) { cout<<"B"; } }; class Derived { public: Derived( ) { cout<<"D"; } virtual void fun( ){ Base::fun( ); cout<<"C"; } } int main ( ) { Base *ptr; Derived obj; ptr=&obj; p->fun ( ); return 0; }
A. DBC
B. DCB
C. BDC
D. CBD
[单项选择]若一程序运行时独占系统全部资源,资源的状态只受该程序而改变,程序执行结果不受外界因素的影响,这是指( )。
A. 程序顺序执行的顺序性
B. 程序顺序执行的封闭性
C. 程序顺序执行的可再现性
D. 并发程序失去封闭性
[单项选择]为使该程序执行结果为10,那么应该在程序划线处填入的语句是( )。 #include<iostream> using namespace std; class MyClass { public: MyClass (int a) { x=a; } ___________ //取x值 private: int x; }; int main( ) { MyClass my(10); cout<<my.GetNum( )<<end1; return 0; }
A. return x;
B. int GetNum(){ return x;}
C. intreturn x;
D. void GetNum(){return x;}
[填空题]程序执行结果s的值是 【7】 。 Private Sub subl(Byval p As Integer) p=p*2 End Sub Private Sub Commandl_Click( ) Dim i As Integer i=3 Call subl(i) ifi>4 then i=i mod 2 Print cstr(i) End Sub
[填空题]程序执行结果s的值是 【7】
Private Sub subl(Byval p As Integer)
p=p*2
End Sub
Private Sub Commandl_Click( )
Dim i As Integer
i=3
Call subl(i)
ifi>4 then i=i mod 2
Print cstr(i)
End Sub
[填空题]程序执行结果s的值是 【14】
Private Sub Command1_click( )
i=0
Do
s=i+s
i=i+1
Loop Until i>=4
End Sub
[填空题]程序执行结果S的值是 【11】
Private Sub Command1_Click( )
i=0
Do
i=i+1
s=i+s
Loop Until i>=4
Print s
End Sub
[填空题]程序执行结果S的值是 【11】 。 Private Sub Command1_click( ) i=0 Do i=i+1 s=i+s Loop Until i>=4 Print s End Sub
[填空题]程序执行结果s的值是 【7】 。 Private Sub sub1(Byval p As Integer) p=p*2 End Sub Private Sub Command1_Click( ) Dim i As Integer i=3 Call sub1(i) if i>4 then i=i mod 2 Print cstr(i) End Sub
[填空题]程序执行结果s的值是 【7】
Private Sub sub1(Byval p As Integer)
p=p*2
End Sub
Private Sub Command1_Click( )
Dim i As Integer
i=3
Call sub1(i)
if i>4 then i=i mod 2
Print cstr(i)
End Sub
[填空题]程序执行结果s的值是 【7】 。 Private Sub sub1(Byval p As Integer) p=p*2 End Sub Private Sub Command1_Click( ) Dim i As Integer i=3 Call sub1(i) if i>4 then i=i mod 2 Print cstr(i) End Sub
[填空题]根据下列程序的执行结果,可以断定划线部分的修饰符应为 【14】 。 执行结果: i9a football is created. a football is created. i=10 a football is destroyed. a football is created. i=20 a football is destroyed. a football is destroyed. 源程序: # inelude<iostream. h> class Football { public: Football( ) {cout<<"a football is created. "<<end1; } ~Football( ) {cout<<"a football is destroyed. "<<end1; }; void func(int i) { ______ Football f1; Football f2; cout<<"i= "<<i<<end1; } void main( ) { func(10); func(20); }
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
public class throwsException
static void Proc(intsel)
throws Arithmetic Exception,Array Index Out Of Bounds Exception
System.out.println("InSituation"+sel);
if(sel==0)
System.out.println("noException caught");
return;

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


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

catch(Array Index Out Of Bounds Exception e)
System.out.println("Catch"+e);

finally
System.out.println("inProcfinally");



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

我来回答:

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

订单号:

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