Adv VB.Net Practice Exam

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Tcarteronw
T
Tcarteronw
Community Contributor
Quizzes Created: 37 | Total Attempts: 30,826
Questions: 53 | Attempts: 843

SettingsSettingsSettings
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

    Correct Answer
    D. Multidimensional arrays
    Explanation
    Page: 333 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    B. An element
    Explanation
    322 Objective: 1

    Rate this question:

  • 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

    Correct Answer
    C. Subscript
    Explanation
    Page: 322 Objective: 1

    Rate this question:

  • 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

    Correct Answer
    D. A Dim statement
    Explanation
    Page: 323 Objective: 1

    Rate this question:

  • 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

    Correct Answer
    D. 26
    Explanation
    Page: 323 Objective: 1

    Rate this question:

  • 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

    Correct Answer
    B. A table lookup
    Explanation
    Page: 329 Objective: 6

    Rate this question:

  • 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

    Correct Answer
    B. The user should be notified if there is no match found in the table
    Explanation
    Page: 332 Objective: 6

    Rate this question:

  • 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

    Correct Answer
    C. Print preview
    Explanation
    Page: 303 Objective: 11

    Rate this question:

  • 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

    Correct Answer
    D. None of the above
    Explanation
    Page: 302 Objective: 11

    Rate this question:

  • 10. 

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

    • A.

      DrawString

    • B.

      WriteLine

    • C.

      String

    • D.

      Print

    Correct Answer
    A. DrawString
    Explanation
    Page: 300 Objective: 11

    Rate this question:

  • 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

    Correct Answer
    C. Callback
    Explanation
    Page: 299 Objective: 11

    Rate this question:

  • 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

    Correct Answer
    B. PrintDocument
    Explanation
    Page: 298 Objective: 11

    Rate this question:

  • 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

    Correct Answer
    D. SelectAll
    Explanation
    Page: 297 Objective: 7

    Rate this question:

  • 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

    Correct Answer
    D. Continue Do
    Explanation
    Page: 295 Objective: 10

    Rate this question:

  • 15. 

    Terminate a For/Next loop with the _______ statement.

    • A.

      Exit

    • B.

      ExitFor

    • C.

      ExitLoop

    • D.

      Continue

    Correct Answer
    B. ExitFor
    Explanation
    Page: 295 Objective: 9

    Rate this question:

  • 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

    Correct Answer
    B. 11
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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.

    Correct Answer
    B. 25
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    C. 4
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    A. 0
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    D. 11
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    B. 4
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    A. When executing the For statement, the counter must be greater than the final value
    Explanation
    Page: 292 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    C. Will make the program difficult to read and understand
    Explanation
    Page: 292 Objective: 8

    Rate this question:

  • 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

    Correct Answer
    D. 10
    Explanation
    Page: 293 Objective: 8

    Rate this question:

  • 25. 

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

    • A.

      Group

    • B.

      Set

    • C.

      Loop

    • D.

      Iteration

    Correct Answer
    C. Loop
    Explanation
    Page: 288 Objective: 8

    Rate this question:

  • 26. 

    A single execution of a group of instructions inside a Do/Loop is called _______.

    • A.

      An iteration

    • B.

      A loop

    • C.

      A set

    • D.

      A group

    Correct Answer
    A. An iteration
    Explanation
    Page: 288 Objective: 8

    Rate this question:

  • 27. 

    The statements inside of a Do/Loop may never be executed if _______.

    • A.

      The terminating condition is at the top of the loop and it is True the first time it is tested

    • B.

      The terminating condition is at the bottom of the loop and it is True the first time it is tested

    • C.

      Both answers A and B would cause the statements in the loop not to be executed

    • D.

      The statements in the loop will always be executed

    Correct Answer
    A. The terminating condition is at the top of the loop and it is True the first time it is tested
    Explanation
    Page: 288 Objective: 8

    Rate this question:

  • 28. 

    The values of Boolean data types are referred to as _______.

    • A.

      Banners

    • B.

      Flags

    • C.

      Ribbons

    • D.

      Posters

    Correct Answer
    B. Flags
    Explanation
    Page: 290 Objective: 8

    Rate this question:

  • 29. 

    When is the counter incremented in a FOR/NEXT statement?

    • A.

      In the NEXT statement

    • B.

      In the FOR statement

    • C.

      In the Exit For statement

    • D.

      When the statements in the loop are executed

    Correct Answer
    A. In the NEXT statement
    Explanation
    Page: 292 Objective: 8

    Rate this question:

  • 30. 

    When is the counter tested in a FOR/NEXT statement?

    • A.

      In the NEXT statement

    • B.

      In the FOR statement

    • C.

      When the counter is initialized

    • D.

      When the counter is incremented

    Correct Answer
    B. In the FOR statement
    Explanation
    Page: 292 Objective: 8

    Rate this question:

  • 31. 

    The process of repeating a series of instructions is called ______________.

    • A.

      Repetition

    • B.

      Reiteration

    • C.

      Looping

    • D.

      Initializing

    Correct Answer
    C. Looping
    Explanation
    Page: 288 Objective: 8

    Rate this question:

  • 32. 

    Which text box event occurs each time the user types a character into a text box?

    • A.

      Click event

    • B.

      GotFocus event

    • C.

      Enter event

    • D.

      TextChanged event

    Correct Answer
    D. TextChanged event
    Explanation
    Page: 287 Objective: 7

    Rate this question:

  • 33. 

    Which text box event occurs when a text box gets the focus?

    • A.

      Click event

    • B.

      Enter event

    • C.

      Leave event

    • D.

      TextChanged event

    Correct Answer
    B. Enter event
    Explanation
    Page: 287 Objective: 7

    Rate this question:

  • 34. 

    An individual item can be deleted from a list with the _______.

    • A.

      Items.Delete method

    • B.

      Items.Clear method

    • C.

      Items.Erase method

    • D.

      Items.RemoveAt method

    Correct Answer
    D. Items.RemoveAt method
    Explanation
    Page: 285 Objective: 4

    Rate this question:

  • 35. 

    The code to delete the selected item from lstColor is _______.

    • A.

      LstColor.Clear

    • B.

      LstColor.RemoveItem

    • C.

      LstColor.Delete (lstColor.ListIndex)

    • D.

      LstColor.Items.RemoveAt (lstColor.SelectedIndex)

    Correct Answer
    D. LstColor.Items.RemoveAt (lstColor.SelectedIndex)
    Explanation
    Page: 286 Objective: 4

    Rate this question:

  • 36. 

    Which of the following code examples can be used to determine the number of items in a list box named lstColor?

    • A.

      LstColor.Count.Index

    • B.

      LstColor.Items.Count

    • C.

      LstColor(Items.Total)

    • D.

      LstColor.SelectedIndex

    Correct Answer
    B. LstColor.Items.Count
    Explanation
    Page: 284 Objective: 6

    Rate this question:

  • 37. 

    What is the value of the SelectedIndex property if the user has not selected an item from a combo box?

    • A.

      -1

    • B.

      0

    • C.

      1

    • D.

      None of the above

    Correct Answer
    A. -1
    Explanation
    Page: 284 Objective: 5

    Rate this question:

  • 38. 

    What is the value of the SelectedIndex property if the user has selected the last item in a list with four items?

    • A.

      3

    • B.

      4

    • C.

      5

    • D.

      0

    Correct Answer
    A. 3
    Explanation
    Page: 284 Objective: 5

    Rate this question:

  • 39. 

    The SelectedIndex property of the first item in a list is _______.

    • A.

      - 1

    • B.

      0

    • C.

      1

    • D.

      True

    Correct Answer
    B. 0
    Explanation
    Page: 284 Objective: 5

    Rate this question:

  • 40. 

    The code that will add the name, John, to a combo box named cboNames is _______.

    • A.

      CboNames.Items.Add (“John”)

    • B.

      CboNames.AddItem = (“John”)

    • C.

      Add.cboNames = (“John”)

    • D.

      Add.”John”.cboNames

    Correct Answer
    A. CboNames.Items.Add (“John”)
    Explanation
    Page: 283 Objective: 4

    Rate this question:

  • 41. 

    Items in a list can be placed in alphabetical order by _______.

    • A.

      Setting the Sorted property to True

    • B.

      Selecting the item in the list and then using the arrow keys to move the item up or down the list

    • C.

      Setting the Alphabetize property to True

    • D.

      Setting the Index property to 1

    Correct Answer
    A. Setting the Sorted property to True
    Explanation
    Page: 283 Objective: 4

    Rate this question:

  • 42. 

    Which of the following instructions will add the word, monkey, to a list box named lstAnimals?

    • A.

      LstAnimals.Insert(monkey)

    • B.

      LstAnimals.Insert (“monkey”)

    • C.

      LstAnimals.Items.Add(monkey)

    • D.

      LstAnimals.Items.Add(“monkey”)

    Correct Answer
    D. LstAnimals.Items.Add(“monkey”)
    Explanation
    Page: 283 Objective: 4

    Rate this question:

  • 43. 

    Items can be added to a list during run time using the _________ method.

    • A.

      AddLists

    • B.

      Lists

    • C.

      ItemsAdd

    • D.

      Items.Add

    Correct Answer
    D. Items.Add
    Explanation
    Page: 282 Objective: 4

    Rate this question:

  • 44. 

    The data that appears in a combo box when it is first displayed can be added to the combo box _______.

    • A.

      Using the Form_Load procedure and the combo box Items.Add method

    • B.

      During design time in the Items Collection of the combo box

    • C.

      Using the ComboBox.Add() method

    • D.

      Answers A and B are correct

    Correct Answer
    D. Answers A and B are correct
    Explanation
    Page: 281 Objective: 4

    Rate this question:

  • 45. 

    Values for the items in a list _______.

    • A.

      Can be entered in the Items collection in the Properties window

    • B.

      Can be entered in the Values collection in the Properties window

    • C.

      Can be entered in the AddItem collection in the Properties window

    • D.

      Must be entered in alphabetical order

    Correct Answer
    A. Can be entered in the Items collection in the Properties window
    Explanation
    Page: 281 Objective: 3

    Rate this question:

  • 46. 

    Items can be added to a list during design time using the _________ collection.

    • A.

      AddLists

    • B.

      Items

    • C.

      ItemsAdd

    • D.

      AddItems

    Correct Answer
    B. Items
    Explanation
    Page: 281 Objective: 3

    Rate this question:

  • 47. 

    List boxes and combo boxes _______.

    • A.

      Are created with the same tool from the toolbox

    • B.

      Have a Text property during design time

    • C.

      Hold a list of values

    • D.

      Always have scroll bars

    Correct Answer
    C. Hold a list of values
    Explanation
    Page: 281 Objective: 1

    Rate this question:

  • 48. 

    Which of the following is not a style for combo boxes?

    • A.

      Simple

    • B.

      DropDown

    • C.

      DropDownList

    • D.

      SimpleList

    Correct Answer
    D. SimpleList
    Explanation
    Page: 281 Objective: 2

    Rate this question:

  • 49. 

    Use the _______ control from the toolbox to create list boxes on a form.

    • A.

      List

    • B.

      ListBox

    • C.

      ComboBox

    • D.

      SimpleList

    Correct Answer
    B. ListBox
    Explanation
    Page: 280 Objective: 1

    Rate this question:

  • 50. 

    A _______ control contains a text box as part of the control

    • A.

      Frame

    • B.

      ListBox

    • C.

      ComboBox

    • D.

      DropDownList

    Correct Answer
    D. DropDownList
    Explanation
    Page: 280 Objective: 1

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 11, 2011
    Quiz Created by
    Tcarteronw
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.