Concepts of Computing, Section II

Visual Basic Practice Quiz

Back to course page.


  1. There is a command button named cmdStart. What is the name of the subroutine that runs when the user clicks this button?

  2. There is a label named lblResult that has a property named Caption. There is a variable named x.

    1. Write the statement that displays the value of x in the label's caption.

    2. Write the statement that displays the variable name x in the label's caption.

  3. Write the value that x has after running each sequence of statements.

    1.     x = 1
          x = x + 2
          x = 2 * x + 1
          x = 2 * (x + 1)
      
    2.     x = 3
          If x < 2 Then
              x = 0
          End If
          x = x + 1
      
    3.     x = 3
          If x < 2 Then
              x = 0
          Else 
              x = 1
          End If
          x = x + 1
      
    4.     x = 1
          Select Case x
             Case 1
                 x = 2
             Case 2
                 x = 3
             Case 3
                 x = 4
          End Select
      
  4. Back to top


    Jon Jacky, jackyj@evergreen.edu