Question: [ Multiple answer ] Identify an error ( or errors ) in the function below Function meanvalue ( ByRef a ( ) As Integer, ByVal

[Multiple answer] Identify an error (or errors) in the function below
Function meanvalue(ByRef a() As Integer, ByVal total_num As Integer) As Single
Dim sum As Integer
For i=1 To total_num
sum = sum +a(i)
Next i
meanvalue = sum ?? total_num
End Function
q,
The action of meanvalue = sum / total_num should le corrected as meanvalue=sum/(total_num-1)
The input argument a() is an array and must be transferred using ByVal
Loop index i is not declared
The variable sum is not initialised
 [Multiple answer] Identify an error (or errors) in the function below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!