VB.Net Quiz 7

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,513
Questions: 43 | Attempts: 420

SettingsSettingsSettings
DotNET Quizzes & Trivia

This quiz is for all network specialists with basic information of the field. Not only will you have a better understanding of it but also gain more knowledge and get clarity on different confusing concepts.


Questions and Answers
  • 1. 

    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
    To create list boxes on a form, the correct control to use from the toolbox is ListBox. A ListBox control allows users to select one or multiple items from a list. It provides a convenient way to display and manage a list of options or data. Other options mentioned, such as List, ComboBox, and SimpleList, are not specifically designed for creating list boxes and may have different functionalities.

    Rate this question:

  • 2. 

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

    • A.

      Frame

    • B.

      ListBox

    • C.

      ComboBox

    • D.

      DropDownList

    Correct Answer
    C. ComboBox
    Explanation
    A ComboBox control contains a text box as part of the control. This allows the user to either select an item from a drop-down list or enter their own custom text in the text box. The text box portion of the ComboBox control is editable and allows the user to input their own values.

    Rate this question:

  • 3. 

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

    • A.

      Simple

    • B.

      DropDown

    • C.

      DropDownList

    • D.

      SimpleList

    • E.

      Colloquialism

    • F.

      Imperatives

    • G.

      Euphemism

    • H.

      Hyperbole

    • I.

      Alliteration

    Correct Answer(s)
    D. SimpleList
    G. EupHemism
  • 4. 

    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
    List boxes and combo boxes hold a list of values. They are used to display a set of options from which the user can select one or multiple values. The main difference between them is that a list box displays all the options at once, while a combo box initially displays only one option and allows the user to expand it to see the full list. Both list boxes and combo boxes can be created using the same tool from the toolbox and have a Text property during design time, but the key characteristic is that they hold a list of values.

    Rate this question:

  • 5. 

    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
    During design time, items can be added to a list using the "Items" collection. This collection allows for the addition of items to the list before the program is executed or run. It provides a convenient way to populate the list with initial data or values.

    Rate this question:

  • 6. 

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

    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
    The data that appears in a combo box when it is first displayed can be added to the combo box using the Form_Load procedure and the combo box Items.Add method, as well as during design time in the Items Collection of the combo box. Both methods can be used to populate the combo box with the desired data before it is displayed to the user.

    Rate this question:

  • 8. 

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

    • A.

      AddLists

    • B.

      Lists

    • C.

      ItemsAdd

    • D.

      Items.Add

    • E.

      Tess’s landlady had alerted the authorities

    • F.

      Tess had known she was going to be captured

    • G.

      Angel believes that the approaching men are criminals

    • H.

      Angel is determined to fight the intruders

    • I.

      Angel had doubted Tess’s story about killing Alec

    Correct Answer(s)
    D. Items.Add
    I. Angel had doubted Tess’s story about killing Alec
  • 9. 

        40.   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
    To place items in a list in alphabetical order, you can set the Sorted property to True. This property automatically arranges the items in the list in alphabetical order based on their values. This means that as you add or modify items in the list, they will automatically be sorted in the correct order. The other options mentioned in the question, such as using the arrow keys or setting other properties, are not specifically designed for alphabetical sorting.

    Rate this question:

  • 10. 

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

    • A.

      AnimalsListBox.Insert(monkey)

    • B.

      AnimalsListBox.Insert (“monkey”)

    • C.

      AnimalsListBox.Items.Add(monkey)

    • D.

      AnimalsListBox.Items.Add(“monkey”)

    Correct Answer
    D. AnimalsListBox.Items.Add(“monkey”)
    Explanation
    The correct answer is animalsListBox.Items.Add("monkey"). This is because the Items property of the animalsListBox is used to add an item to the list box, and the parameter passed to the Add method should be a string, in this case "monkey".

    Rate this question:

  • 11. 

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

    • A.

      NamesComboBox.Items.Add (“John”)

    • B.

      NamesComboBox.AddItem = (“John”)

    • C.

      Add.namesComboBox = (“John”)

    • D.

      Add.”John”.namesComboBox

    Correct Answer
    A. NamesComboBox.Items.Add (“John”)
    Explanation
    The correct answer is namesComboBox.Items.Add ("John"). This code will add the name "John" to the combo box named namesComboBox by using the Add method of the Items property.

    Rate this question:

  • 12. 

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

    • A.

      -1

    • B.

      0

    • C.

      1

    • D.

      True

    Correct Answer
    B. 0
    Explanation
    The SelectedIndex property of the first item in a list is 0 because the index of the first item in a list is always 0 in most programming languages. This means that when the first item is selected, the SelectedIndex property will be set to 0.

    Rate this question:

  • 13. 

    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

    • E.

      Emphasize the luxurious circumstances of Tess’s life with Alec

    • F.

      Introduce the detail of the missing carving knife

    • G.

      Show the haste in which Tess had left the lodging house

    • H.

      Establish that Mrs. Brooks was a generous landlady

    • I.

      Present a scene of a comfortable domestic routine

    Correct Answer(s)
    A. -1
    F. Introduce the detail of the missing carving knife
    Explanation
    The value of the SelectedIndex property is -1 if the user has not selected an item from a combo box. This value indicates that no item has been selected. The other options provided in the question are unrelated and do not provide an explanation for the correct answer.

    Rate this question:

  • 14. 

    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
    The value of the SelectedIndex property is 3 if the user has selected the last item in a list with four items. This is because the index of the first item in the list is 0, and the index of the last item is one less than the total number of items in the list. Therefore, if there are four items in the list, the index of the last item would be 3.

    Rate this question:

  • 15. 

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

    • A.

      ColorListBox.Count.Index

    • B.

      ColorListBox.Items.Count

    • C.

      ColorListBox(Items.Total)

    • D.

      ColorListBox.SelectedIndex

    Correct Answer
    B. ColorListBox.Items.Count
    Explanation
    The correct answer is colorListBox.Items.Count. This code example can be used to determine the number of items in a list box named colorListBox. The ".Items" property is used to access the collection of items in the list box, and the ".Count" property is used to retrieve the number of items in that collection.

    Rate this question:

  • 16. 

    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
    The Items.RemoveAt method is used to delete an individual item from a list. This method removes the item at the specified index position in the list, effectively shifting all subsequent items down by one position. This allows for the removal of a specific item without affecting the rest of the list.

    Rate this question:

  • 17. 

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

    • A.

      ColorListBox.Clear

    • B.

      ColorListBox.RemoveItem

    • C.

      ColorListBox.Delete (colorListBox.ListIndex)

    • D.

      ColorListBox.Items.RemoveAt (colorListBox.SelectedIndex)

    Correct Answer
    D. ColorListBox.Items.RemoveAt (colorListBox.SelectedIndex)
    Explanation
    The correct answer is colorListBox.Items.RemoveAt (colorListBox.SelectedIndex). This code removes the item at the selected index from the colorListBox control.

    Rate this question:

  • 18. 

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

    • A.

      Click event

    • B.

      Enter event

    • C.

      Leave event

    • D.

      TextChanged event

    • E.

      Bitter reflection to fervent entreaty

    • F.

      Justified anger to threatening cynicism

    • G.

      Mock-seriousness to flirtatious banter

    • H.

      Historical allusion to contemporary jargon

    • I.

      Sullen detachment to unabashed groveling

    Correct Answer(s)
    B. Enter event
    G. Mock-seriousness to flirtatious banter
    Explanation
    The Enter event occurs when a text box gets the focus. This event is triggered when the user clicks on or tabs into the text box, indicating that they are ready to input text. The other events listed are unrelated to the focus of the text box and do not pertain to its behavior when it receives focus. The additional phrases listed after the answer choice are unrelated and do not provide any relevant information.

    Rate this question:

  • 19. 

    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
    The TextChanged event occurs each time the user types a character into a text box. This event is triggered whenever the text in the text box is changed, whether it is through typing, pasting, or deleting characters. It allows for immediate response or action to be taken based on the changes made in the text box.

    Rate this question:

  • 20. 

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

    • A.

      Repetition

    • B.

      Reiteration

    • C.

      Looping

    • D.

      Initializing

    Correct Answer
    C. Looping
    Explanation
    The process of repeating a series of instructions is called looping. In programming, a loop is used to execute a block of code multiple times until a certain condition is met. This allows for efficient and automated repetition, reducing the need for manual repetition of code. The other options, repetition and reiteration, are similar in meaning but do not specifically refer to the concept of repeating instructions in a programming context. Initializing, on the other hand, refers to the process of assigning an initial value to a variable.

    Rate this question:

  • 21. 

    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
    In a Do/Loop, a group of instructions is repeatedly executed until a certain condition is met. This repetition is called a loop. The loop allows the instructions to be executed multiple times, helping to automate tasks and save time. Therefore, the correct answer is "loop."

    Rate this question:

  • 22. 

    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
    In a Do/Loop, a group of instructions is executed repeatedly until a certain condition is met. Each execution of this group of instructions is called an iteration. Therefore, the correct answer is "an iteration".

    Rate this question:

  • 23. 

    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

    • E.

      Had lost its beauty over time

    • F.

      Had caused her to go to Tantridge

    • G.

      Had attracted Alec to her

    • H.

      Had alienated her from her peers

    • I.

      Had shown her anguish over her baby

    Correct Answer(s)
    A. The terminating condition is at the top of the loop and it is True the first time it is tested
    G. Had attracted Alec to her
    Explanation
    If the terminating condition is at the top of the loop and it is True the first time it is tested, the statements inside the loop may never be executed. This is because the terminating condition is checked before the loop is entered, and if it is already True, the loop will not be executed at all. Therefore, the statements inside the loop will not have a chance to be executed.

    Rate this question:

  • 24. 

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

    • A.

      Banners

    • B.

      Flags

    • C.

      Ribbons

    • D.

      Posters

    Correct Answer
    B. Flags
    Explanation
    Boolean data types in programming are used to represent true or false values. The term "flags" is often used to describe variables or values that act as indicators or signals, typically representing a true or false condition. Therefore, "flags" is an appropriate term to refer to the values of Boolean data types.

    Rate this question:

  • 25. 

    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
    The counter is incremented in the NEXT statement. This is because the NEXT statement is responsible for controlling the loop and determining when it should terminate. When the NEXT statement is reached, the counter is incremented and the loop continues until the termination condition is met. Therefore, the counter is incremented in the NEXT statement.

    Rate this question:

  • 26. 

    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
    The counter is tested in the FOR statement. In a FOR/NEXT statement, the FOR statement initializes the counter and sets the initial value. The counter is then tested to see if it meets the specified condition. If the condition is true, the loop continues to execute. If the condition is false, the loop is exited and the program moves on to the next statement after the NEXT statement. Therefore, the counter is tested in the FOR statement to determine if the loop should be executed.

    Rate this question:

  • 27. 

    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
    The For/Next statement terminates iteration when executing the For statement, the counter must be greater than the final value. This means that the loop will continue as long as the counter is less than or equal to the final value, and it will stop once the counter becomes greater than the final value.

    Rate this question:

  • 28. 

    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.

      Connotative diction

    • F.

      Convoluted syntax

    • G.

      Powerful invective

    • H.

      Historical references

    • I.

      Indirect allusion

    Correct Answer(s)
    C. Will make the program difficult to read and understand
    E. Connotative diction
    Explanation
    Incorrect indentation of the statements in For/Next loops will make the program difficult to read and understand. This is because indentation is used to visually organize the code and indicate the hierarchy of the statements. When the indentation is incorrect, it becomes harder to follow the flow of the program and understand the logic. Additionally, it can lead to confusion and mistakes when trying to modify or debug the code. Connotative diction, convoluted syntax, powerful invective, historical references, and indirect allusion are not relevant to the given question.

    Rate this question:

  • 29. 

    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
    The statements inside the For/Next loop will be executed 10 times because the loop is set to iterate from 1 to 10 (inclusive) with the statement "For indexInteger = 1 to 10". The "Next indexInteger" indicates the end of the loop. Therefore, the statements within the loop will be executed once for each value of indexInteger from 1 to 10.

    Rate this question:

  • 30. 

    How many times will the statements inside this For/Next loop be executed?

    • A.

      2

    • B.

      4

    • C.

      5

    • D.

      10

    Correct Answer
    B. 4
    Explanation
    The statements inside the For/Next loop will be executed 4 times. This can be determined by looking at the given options and selecting the one that represents the number of times the loop will iterate.

    Rate this question:

  • 31. 

    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
    The value of indexInteger starts at 1 and goes up to 10 in the loop. After the loop is completed, the value of indexInteger is incremented one more time, resulting in a value of 11.

    Rate this question:

  • 32. 

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

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

    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
    The value of valueInteger will be 25 after the execution of these statements. The loop starts with indexInteger = 1 and increments by 2 in each iteration. So, in the first iteration, valueInteger will be incremented by 1, in the second iteration it will be incremented by 3, in the third iteration by 5, and so on. Therefore, the final value of valueInteger will be the sum of all odd numbers from 1 to 10, which is 25.

    Rate this question:

  • 35. 

    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
    The value of indexInteger after the execution of these statements will be 11. This is because the loop starts with indexInteger = 1 and increments it by 2 in each iteration. So, the values of indexInteger during the loop will be 1, 3, 5, 7, 9. After the loop, indexInteger is incremented by 2 one more time, resulting in a final value of 11.

    Rate this question:

  • 36. 

    Terminate a For/Next loop with the _______ statement

    • A.

      Exit

    • B.

      ExitFor

    • C.

      ExitLoop

    • D.

      Continue

    Correct Answer
    B. ExitFor
    Explanation
    The correct answer is "ExitFor". In a For/Next loop, the "ExitFor" statement is used to prematurely terminate the loop and transfer the control to the statement immediately following the loop. This allows the program to skip the remaining iterations of the loop and continue with the execution of the code.

    Rate this question:

  • 37. 

    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
    The correct answer is "Continue Do". In a Do loop, the "Continue Do" statement is used to skip the remaining code within the loop and move to the next iteration of the loop. This allows the program to bypass certain conditions or actions and continue with the next iteration of the loop.

    Rate this question:

  • 38. 

    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
    The SelectAll method is used to make all of the text in a text box appear selected. This method selects all the text in the text box, making it easier for the user to edit or delete the entire content at once. By calling the SelectAll method, the text box automatically highlights and selects all the text, allowing the user to perform the desired action on the entire text without having to manually select it.

    Rate this question:

  • 39. 

    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
    The PrintDocument component in a software application provides methods and events that can be used to set up the output for the printer. It allows the application to specify the content to be printed, set up page layout and formatting options, handle printing events, and send the document to the printer for printing. Therefore, the PrintDocument component is the correct choice for setting up output for the printer.

    Rate this question:

  • 40. 

    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
    The PrintDocument's PrintPage event is fired once for each page to be printed. This technique is referred to as a callback.

    Rate this question:

  • 41. 

    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
    The DrawString method is used to send a line of text to the graphics page. This method is commonly used in programming languages to display text on a graphical user interface or a canvas. It allows developers to specify the text to be displayed, the font, size, and position of the text. By using this method, the text can be easily rendered on the graphics page, making it visible to the user.

    Rate this question:

  • 42. 

    The code to print the selected item from the colorListBox is _______.

    • A.

      ColorListBox.PrintLine

    • B.

      ColorListBox.Print

    • C.

      Print colorListBox.Text

    • D.

      None of the above

    Correct Answer
    D. None of the above
    Explanation
    The correct code to print the selected item from the colorListBox is not given in the options provided. Therefore, the answer is "None of the above".

    Rate this question:

  • 43. 

    ________ 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
    Print preview is used for viewing print output on the screen before actually printing it. It allows the user to see how the document will appear when printed, including the layout, formatting, and page breaks. The user can then choose to proceed with printing or cancel the print job based on the previewed output.

    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 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 13, 2011
    Quiz Created by
    Tcarteronw

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.