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:
Verified
Q15: When a parameter is declared using the
Q16: Which of the following examples correctly uses
Q17: Which of the following functions accepts a
Q18: Which of the following calls to the
Q19: When debugging a program in break mode,
Q21: Which of the following procedure declarations matches
Q22: Choose a new, more descriptive name for
Q23: What is wrong with the following GetName
Q24: What will be the value of dblSum
Q25: Which of the following can be returned
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents