CSIS 208 Quiz 3 Liberty University
- What is displayed when the button is clicked on?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim a, b as String
Dim x as Integer
a = “How now brown cow.”
b = “brown”
x = FindIt(a, b)
Text = CStr(x)
End Sub
Function FindIt(z1 as String, z2 as String) As Integer
Dim x as Integer
x = z1.IndexOf(z2)
End Function - In a Select Case block, if more than one Case clause matches the selector,
- Programmers frequently write event procedures for the group box control. (T/F)
- The second condition in cond1 OrElse cond2 is not evaluated when the first condition is false. (T/F)
- “1st Place” < “2nd Place” (T/F)
- The value of IsNumeric(“$20.00”) is True. (T/F)
- Breaking up a large problem into smaller subproblems is called _________________.
- A variable declared inside an If block ceases to exist after the block is exited. (T/F)
- What will be the output of the following program when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim word1, word2, newWord As String
word1 = “shower”
word2 = “about”
newWord = word1.Substring(0, 4) & word2.Substring(0, 3)
If newWord.IndexOf(“how”) = -1 Then
Text = “The new word was not found.”
Else
txtBox.Text = “Found it.”
End If
End Sub - What property gives the value of the index of an item selected in a list box.
- The Case Else part of a Select Case block is optional. (T/F)
- If two simple conditions are true, the compound condition created from them by the And operator is also true. (T/F)
- Every Select Case block can be replaced by If blocks. (T/F)
- The value of “education”.StartsWith(“ED”) is True. (T/F)
- The following lines of code are correct. (T/F)
If age >= 13 And < 20 Then
Text = “You are a teenager.”
End If - Each argument in a calling statement must have the same name as the corresponding parameter in the header of the called procedure. (T/F)
- Select Case choices are determined by the value of an expression called a selector. (T/F)
- Which of the following is true?
- What keyword in the header of a Sub procedure denotes that a variable is passed by reference?
- Which statement is true?