What does the following code display? 1 Private Sub btnDisplay_Click(..) Handles btnDisplay. Click 2 3 Dim amt1 As Integer = 1, amt 2 As Integer = 2 4 1stOutput.Items.Add(amt1 & " " & amt2) 5 Swap (amt1, amt2) 6 1stOutput.Items.Add(amt1 & 7 End Sub 8 11 Dim temp As Integer 12 temp = num1 13 num1 = num2 3 9 Sub Swap (ByRef num1 As Integer, ByVal num2 As Integer) 10 14 num2= temp 15 1stOutput.Items.Add(num1 16 num2=3 17 End Sub 3 & amt2) 2 & num2)

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
What does the following code display?
1 Private Sub btnDisplay_Click() Handles btnDisplay. Click
2
3 Dim amt1 As Integer = 1, amt2 As Integer = 2
4
& " " & amt2)
5
1stOutput.Items.Add(amt1
Swap (amt1, amt2)
1stOutput.Items.Add(amt1 & "
6
7 End Sub
8
9 Sub Swap (ByRef num1 As Integer, ByVal num2 As Integer)
10
11 Dim temp As Integer
12 temp = num1
13 num1 = num2
2
& amt2)
14 num2 = temp
15 1stOutput.Items.Add(num1 = " " & num2)
16 num2 = 3
17 End Sub
Transcribed Image Text:What does the following code display? 1 Private Sub btnDisplay_Click() Handles btnDisplay. Click 2 3 Dim amt1 As Integer = 1, amt2 As Integer = 2 4 & " " & amt2) 5 1stOutput.Items.Add(amt1 Swap (amt1, amt2) 1stOutput.Items.Add(amt1 & " 6 7 End Sub 8 9 Sub Swap (ByRef num1 As Integer, ByVal num2 As Integer) 10 11 Dim temp As Integer 12 temp = num1 13 num1 = num2 2 & amt2) 14 num2 = temp 15 1stOutput.Items.Add(num1 = " " & num2) 16 num2 = 3 17 End Sub
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning