Solved

Which of the Following Code Examples Is a Function That

Question 20

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents