首页试题详情
难度: 使用次数:138更新时间:2026/03/16
1.
下列代码中,哪一个是正确的函数定义语法?
A.Function Add(a As Integer, b As Integer) As Integer
B.Function Add(a, b) As Integer
C.Func Add(a As Integer, b As Integer) As Integer
D.Sub Add(a As Integer, b As Integer) As Integer
题型:选择题 知识点:第九章 面向对象程序设计
【答案】
A
【解析】
在Visual Basic中,函数定义使用Function,参数类型最好明确书写,函数返回类型也需指定,而Func不是Visual Basic的关键字。

查看答案和解析

支付 ¥0.1 即可查看此题答案和详细解析

低至 ¥0.1 起

类题推荐:

未分类