CSIS 208 Quiz 3

CSIS 208 Quiz 3 Liberty University

  1. 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
  2. In a Select Case block, if more than one Case clause matches the selector,
  3. Programmers frequently write event procedures for the group box control. (T/F)
  4. The second condition in cond1 OrElse cond2 is not evaluated when the first condition is false. (T/F)
  5. “1st Place” < “2nd Place” (T/F)
  6. The value of IsNumeric(“$20.00”) is True. (T/F)
  7. Breaking up a large problem into smaller subproblems is called _________________.
  8. A variable declared inside an If block ceases to exist after the block is exited. (T/F)
  9. 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

  10. What property gives the value of the index of an item selected in a list box.
  11. The Case Else part of a Select Case block is optional. (T/F)
  12. If two simple conditions are true, the compound condition created from them by the And operator is also true. (T/F)
  13. Every Select Case block can be replaced by If blocks. (T/F)
  14. The value of “education”.StartsWith(“ED”) is True. (T/F)
  15. The following lines of code are correct. (T/F)
    If age >= 13 And < 20 Then
    Text = “You are a teenager.”
    End If
  16. Each argument in a calling statement must have the same name as the corresponding parameter in the header of the called procedure. (T/F)
  17. Select Case choices are determined by the value of an expression called a selector. (T/F)
  18. Which of the following is true?
  19. What keyword in the header of a Sub procedure denotes that a variable is passed by reference?
  20. Which statement is true?
$2.99
Buy Answer Key
  • Find by class