单项选择题

以下用户自定义函数

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