Solved

Which of the Following Code Examples Is a Function That

Question 8

Multiple Choice

Which of the following code examples is a function that will accept three integer parameters, calculate their average, and return the result?


A) Function Average(ByVal intX As Integer, ByVal intY As Integer, _
ByVal intZ As Integer) As Single
Average = (intX + intY + intZ) / 3
End Function

B) Function Average(ByVal intX As Integer, ByVal intY as Integer, _
ByVal intZ As Integer) As Single
Average = intX + intY + intZ / 3
Return Average
End Function

C) Function Average(ByRef intX As Integer, ByRef intY as Integer, _
ByRef intZ As Integer, ByRef Average As Double)
Average = (intX + intY + intZ) / 3
End Function

D) Function Average(ByVal intX As Integer, ByVal IntY as Integer, _
ByVal intZ As Integer) As Single
Return (intX + intY + intZ) / 3
End Function

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions