题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-17 02:22:53

[单项选择]工程文件中包含一个模块文件和一个窗体文件。模块文件的程序代码是:
Public x As Integer
Private y As Integer
窗体文件的程序代码是:
Dim a As Integer
Private Sub Form_Load( )
Dim b As Integer
a =2: b =3: x =10: y =20
End Sub
Private Sub Command1_Click( )
a =a +5: b =b +5: x =x +5: y =y +5
Print a; b; x; y
End Sub
运行程序,单击窗体上的命令按钮,则在窗体上显示的是( )。
A. 5 5 15 5
B. 7 5 15 25
C. 7 8 15 5
D. 7 5 15 5

更多"工程文件中包含一个模块文件和一个窗体文件。模块文件的程序代码是: P"的相关试题:

[单项选择]设工程文件包含两个窗体文件Form1. frm、Form2. frm及一个标准模块文件Module1. bas。两个窗体上分别只有一个名称为Command1的命令按钮。
Form1的代码如下:
Public x As Integer
Private Sub Form_Load( )
x=1
y=5
End Sub
Private Sub Command1_Click( )
Form2. Show
End Sub
Private Sub Command1_Cliek( )
Print Form1. x, y
End Sub
Module1的代码如下:
Public y As Integer
运行以上程序,单击Form1的命令按钮Command1,则显示Form2;再单击Form2上的命令按钮Command1,则窗体上显示的是( )。
A. 1 5
B. 0 5
C. 0 0 D) 程序有错
[单项选择]

设工程文件包含两个窗体文件Forml.frm、Form2.frm及一个标准模块文件Modulel.bas。两个窗体上分别只有一个名称为Command1的命令按钮。
Forml的代码如下:
Public x As Integer
Privme Sub Form_Load( )
x=1
y=5
End Sub
Private Sub Command1_Click( )
Form2.Show
End Sub
Form2的代码如下:
Private Sub Command1_Click( )
Print Form1.x,y
End Sub
Modulel的代码如下:
Public y As Integer
运行以上程序,单击Form1的命令按钮Command1,则显示Form2;再单击Form2上的命令按钮Command1,则窗体上显示的是()。


A. 1 5
B. 0 5
C. 0 0
D. 程序有错
[单项选择]

设工程文件包含两个窗体文件Form1.frm、Form2.frm及一个标准模块文件Module1.bas。两个窗体上分别只有一个名称为Command1的命令按钮。
Form1的代码如下:
Public x As Integer
Private Sub Form_Load( )
x=1
y=5
End Sub
Private Sub Command1_Chck( )
Form2.Show
End Sub
Form2的代码如下:
Private Sub Command1_Click( )
Print Form1.x,y
End Sub
Module1的代码如下:
Public y As Integer
运行以上程序,单击Form1的命令按钮Command1,则显示Form2;再单击Form2上的命令按钮Command1,则窗体上显示的是()。


A. 1 5
B. 0 5
C. 0 0
D. 程序有错
[单项选择]单击命名按钮时,下列程序代码的执行结果为 Public Sub procl ( n As Integer, Byval m As Integer) n=n Mod 10 m=m Mod 10 End Sub Private Sub Cmmand1 Click( ) Dim x As Integer, y As Integer x=12:y=12 Call Procl (x, y) Print x;y End Sub
A. 12 2
B. 2 12
C. 2 2
D. 12 12
[单项选择]单击命令按钮时,下列程序代码的执行结果为
Public Sub proc1(n As Integer,Byva1 m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
Private Sub Cmmand1_Click( )
Dim x As Integer,y As lngeger
x=12:y=12
Call Proe1(x,y)
Print x;y
End Sub
A. 12 2
B. 2 12
C. 2 2
D. 12 12
[单项选择]标准模块中有如下程序代码:
Public x As Integer,Y As Integer
Sub TempSub( )
x=10:y=20
End Sub
在窗体上有1个命令按钮,并有如下事件过程:
Private Sub Command1 Click( )
Dim x As Integer
Call TempSub
x=x+100:y=y+100
Print x;y
End Sub
运行程序后单击命令按钮,窗体上显示的是( )。
A. 110 100
B. 100 100
C. 100 120
D. 110 120
[单项选择]标准模块中有如下程序代码: Public x As Integer,y As Integer Sub var_pub( ) x=10:y=20 End Sub 在窗体上有1个命令按钮,并有如下事件过程: Private Sub Command1_Click( ) Dim x As Integer Call var_pub x=x+100 y=y+100 Print x;y End Sub 运行程序后单击命令按钮,窗体上显示的是()
A. 100 100
B. 100 120
C. 110 100
D. 110 120
[单项选择]设在工程中有一个标准模块,其中定义了如下类型:
Type stutype
ino As Integer
strname As String*20
strsex As String*1
smark As Single
End Type
在窗体上画一个名为Connnand1的命令按钮,要求当执行事件过程Command1_Click时,在c:/的随机文件student..dat写入一条记录。下列能够完成该操作的事件过程是( )。
A. Sub Command1_C1ick()
B. Sub Command1_Click( )
C. Sub Command1_Click()
D. Sub Command1_Click()
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: 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 【14】 in Proc findly
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
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
【14】
in Proc findly
[填空题]请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
public class throwsException
static void Proc(int sel)
throws ArithmeticException,ArrayIndexOutOfBoundsException
System.out.println("In Situation"+sel);
if(sel==0)
System.out.println(’no Exception caught");
return;

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


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

catch(ArrayIndexOutOfBoundsException e)
System.out.println("Catch"+e);

finally
System.out.println("in Proc finally");



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

我来回答:

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

订单号:

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