全国计算机等级考试二级模拟试卷第24套(2025年6月)

共60题 | 满分100分 | 考试时间120分钟

0
已答题
60
未答题
单项选择题第 1 题 / 共 40 题每题 1.5 分

以下哪一项代码能正确地定义并调用一个Function函数?

AFunction sum(x As Integer, y As Integer) As Integer Return x + y End Function Call sum(2, 3)
BFunction sum(x As Integer, y As Integer) As Integer sum = x + y End Function sum(2, 3)
CFunction sum(x As Integer, y As Integer) Return x + y End Function sum(2, 3)
DFunction sum(x As Integer, y As Integer) As Integer Return x + y End Function sum(2, 3) = 5