Adv VB.Net Practice Exam

53 Questions | Total Attempts: 678

SettingsSettingsSettings
Please wait...
Visual Basic Quizzes & Trivia

Questions and Answers
  • 1. 
    _______ can be used when two subscripts are needed to identify tabular data, such as when data is arranged in rows and columns.
    • A. 

      Complex subscripts

    • B. 

      List boxes

    • C. 

      Text boxes

    • D. 

      Multidimensional arrays

  • 2. 
    An array is a set of variables.  Each individual variable is called _______.
    • A. 

      A subscript

    • B. 

      An element

    • C. 

      A subscripted variable

    • D. 

      An index

  • 3. 
    The individual variables in an array are accessed by their _______, which is their position in the array.
    • A. 

      Index

    • B. 

      ListCount property

    • C. 

      Subscript

    • D. 

      ItemCount property

  • 4. 
    Declare an array and specify the number of elements using _______.
    • A. 

      The ListCount property

    • B. 

      The ListIndex property

    • C. 

      An Array statement

    • D. 

      A Dim statement

  • 5. 
    How many elements are contained in the array created with the following code?                           Dim strEmployee (25) As String
    • A. 

      0 (the code is incorrect to create an array)

    • B. 

      24

    • C. 

      25

    • D. 

      26

  • 6. 
    __________ can be used to find a specific value in an array.
    • A. 

      The Find method of an array

    • B. 

      A table lookup

    • C. 

      The Locate.Item property

    • D. 

      A Case structure

  • 7. 
    When performing a table lookup, it is a good idea to include validation because _______.
    • A. 

      When looking for a table it is very likely that the table will not exist

    • B. 

      The user should be notified if there is no match found in the table

    • C. 

      Validation will add a new element to the table if no match is found

    • D. 

      It will cause the lookup to perform much faster than without validation

  • 8. 
    ________ is used for viewing print output on the screen.  The user can then choose to print or cancel.
    • A. 

      Preview

    • B. 

      Sample view

    • C. 

      Print preview

    • D. 

      Test print page

  • 9. 
    The code to print the selected item from the lstColor is _______.
    • A. 

      LstColor.PrintLine

    • B. 

      LstColor.Print

    • C. 

      Print lstColor.Text

    • D. 

      None of the above

  • 10. 
    The _______ method is used to send a line of text to the graphics page.
    • A. 

      DrawString

    • B. 

      WriteLine

    • C. 

      String

    • D. 

      Print

  • 11. 
    The PrintDocument's PrintPage event is fired once for each page to be printed.  This technique is referred to as a _______.
    • A. 

      PagePrint method

    • B. 

      Graphics page

    • C. 

      Callback

    • D. 

      SystemPrint

  • 12. 
    The methods and events of the _________ component can be used to set up output for the printer.
    • A. 

      Printer

    • B. 

      PrintDocument

    • C. 

      Print

    • D. 

      PrintAndPreview

  • 13. 
    What method is used to make all of the text in a text box appear selected?
    • A. 

      SelectText

    • B. 

      SelectedIndex

    • C. 

      SelectedItem

    • D. 

      SelectAll

  • 14. 
    Skip to the next iteration of a Do loop with the _______ statement.
    • A. 

      Exit For

    • B. 

      Exit Do

    • C. 

      Continue For

    • D. 

      Continue Do

  • 15. 
    Terminate a For/Next loop with the _______ statement.
    • A. 

      Exit

    • B. 

      ExitFor

    • C. 

      ExitLoop

    • D. 

      Continue

  • 16. 
    What will be the value of indexInteger after execution of these statements?             For indexInteger = 1 to 10 Step 2                 valueInteger = += indexInteger                         Next indexInteger
    • A. 

      10

    • B. 

      11

    • C. 

      13

    • D. 

      14

  • 17. 
    What will be the value of valueInteger after execution of these statements?             For indexInteger = 1 to 10 Step 2                 valueInteger += indexInteger                         Next indexInteger
    • A. 

      20

    • B. 

      25

    • C. 

      36

    • D. 

      None of the above.

  • 18. 
    What is the value of indexInteger after the loop below is executed?                 For indexInteger = 4 to 1                   'Statements in loop                 Next indexInteger
    • A. 

      0

    • B. 

      1

    • C. 

      4

    • D. 

      5

  • 19. 
    How many times will the statements inside this For/Next loop be executed?                 For indexInteger = 4 to 1                   'Statements in loop                             Next indexInteger
    • A. 

      0

    • B. 

      3

    • C. 

      4

    • D. 

      5

  • 20. 
    What is the value of indexInteger after the code in the loop below is completed?                 For indexInteger = 1 to 10                   'Statements in loop                 Next indexInteger
    • A. 

      0

    • B. 

      1

    • C. 

      10

    • D. 

      11

  • 21. 
    How many times will the statements inside this For/Next loop be executed?                 For indexInteger = 2 to 12 Step 3                   'Statements in loop                             Next indexInteger
    • A. 

      2

    • B. 

      4

    • C. 

      5

    • D. 

      10

  • 22. 
    When does a For/Next statement terminate iteration?
    • A. 

      When executing the For statement, the counter must be greater than the final value

    • B. 

      When executing the For statement, the counter must be the same as the final value

    • C. 

      When executing the Next statement, the counter must be greater than the final value

    • D. 

      When executing the Next statement, the counter must be the same as the final value

  • 23. 
    Incorrect indentation of the statements in For/Next loops _______.
    • A. 

      Will cause the program to halt

    • B. 

      Will cause the logic of calculations inside the loop to perform incorrectly

    • C. 

      Will make the program difficult to read and understand

    • D. 

      All of the above

    • E. 

      None of the above

  • 24. 
    How many times will the statements inside this For/Next loop be executed?                 For indexInteger = 1 to 10                   'Statements in loop                 Next indexInteger
    • A. 

      2

    • B. 

      4

    • C. 

      5

    • D. 

      10

  • 25. 
    The group of instructions that are repeated in a Do/Loop are called a(n) __________.
    • A. 

      Group

    • B. 

      Set

    • C. 

      Loop

    • D. 

      Iteration

Back to Top Back to top