1. (TCO 8) When we pass a variable by reference, any
changes that the procedure makes to the variable will _____.
change the value in the original variable
change the value inside the called function/sub procedure
only
change the address of the variable
not make any significant changes
2. (TCO 8) What is wrong with the following call statement
and its corresponding sub statement?
Call Statement:
DayOfTheWeek(15, "June", 1902)
Sub Statement:
Sub DayOfTheWeek(ByVal var1 As Integer, ByVal var2 As String,
ByVal var3 As String)
Constant values like 1902 cannot be passed, only variables.
It is not valid to pass a value like "June."
var3 is not of the same data type as 1902.
Nothing is wrong with them.
3. (TCO 8) What changes are required in the following
code so that the resulting output is as follows?
Expected Output:
num1 = 17
num2 = 7
Code: Sub Main()
Dim num1 As Integer = 16
Dim num2 As Integer = 6
AddOne(num1)
AddOne(num2)
Console.WriteLine("num1 = " & num1)
Console.WriteLine("num2 = " & num2)
End Sub
Sub AddOne(ByVal x As Integer)
x = x + 1
End Sub
Change function declaration to: XXX XXXXXX(ByRef x As
Integer).
Change function declaration to: XXX XXXXXX (ByVal x As
Integer) As Integer.












Other samples, services and questions:
When you use PaperHelp, you save one valuable — TIME
You can spend it for more important things than paper writing.