Question
What happens in this click event? Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim flag As Boolean Dim a As Integer = 10 Dim num As Integer
What happens in this click event?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim flag As Boolean
Dim a As Integer = 10
Dim num As Integer
num = a Mod 5
Do While flag = False
a += num
If a * num <> 0 Then
flag = True
End If
Loop
txtOut.Text = CStr(a)
End Sub
both a and num should be variable type double |
When loop out, flag = false |
a should be variable type double |
a times num is not equal to 0 |
an infinite loop What is the output of following- Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim row As String = "" For i as Integer = 1 to 9 row &= "*" Next txtOutput.Text = row End Sub
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started