栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 笔试题库

[单项选择题] 以下用户自定义函数 Function Func(a As Integer, b As Integer) As Integer Static m As Integer, i As

笔试题库 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

[单项选择题] 以下用户自定义函数   Function Func(a As Integer, b As Integer) As Integer   Static m As Integer, i As

[单项选择题] 以下用户自定义函数

Function Func(a As Integer, b As Integer) As Integer

Static m As Integer, i As Integer

m=0:i=2

i=i+m+i

m=i+a+b

Func=m

End Function

在窗体上画一个命令按钮,然后编写如下事件过程:

Private Sub Command1_Click()

Dim k As Integer,m As Integer,p As Integer

k=4:m=1

P=Func(k,m)

Print p

End Sub

程序运行后,单击命令按钮,输出结果为

A.8

B.9

C.10

D.11

正确答案:

A

参考解析:

变量i的计算过程为i=2+0+1 =3,变量m的计算过程为m=3+4+1=8,m的值通过于函数名Fune返回。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/481917.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号