0

Visual Basic (VB) .Net Quiz - 2

Description: Visual Basic (VB) .Net Quiz - 2
Number of Questions: 15
Created by:
Tags: .net vb
Attempted 0/15 Correct 0 Score 0

In the statement, Dim Days(7) as String, what part of the array does the number 7 refer to?

  1. Array name

  2. Datatype

  3. Lowerbound

  4. Upperbound

  5. Size


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Array name - The array name is "Days", not "7". Therefore, this option is incorrect.

Option B) Datatype - The datatype of the array is "String", not "7". Therefore, this option is incorrect.

Option C) Lowerbound - The lower bound of the array is not specified in the given statement. Therefore, this option is incorrect.

Option D) Upperbound - The number 7 in the statement "Dim Days(7) as String" refers to the upper bound of the array. This means that the array can hold a maximum of 8 elements (0 to 7). Therefore, this option is correct.

Option E) Size - The size of the array can be determined by subtracting the lower bound from the upper bound (upper bound - lower bound + 1). Since the lower bound is not specified in the given statement, we cannot determine the size of the array. Therefore, this option is incorrect.

The correct answer is D. This option is correct because the number 7 in the statement "Dim Days(7) as String" refers to the upper bound of the array.

What is required to reference an element in an array?

  1. Array name

  2. Index value of the element

  3. Element value

  4. Both a and b.

  5. All of the above.


Correct Option: D

Which method will arrange the elements of an array in alphabetical order?

  1. Arrange

  2. Assemble

  3. Order

  4. Rank

  5. Sort


Correct Option: E

The number of variables allowed in a structured is:

  1. 1

  2. 2

  3. 3

  4. Any number of variables can be declared in an array.


Correct Option: D

The variable inside a structure is called a(n):

  1. associate.

  2. constituent.

  3. element.

  4. member.

  5. part.


Correct Option: D

Which datatype can an array not hold?

  1. TextBoxes

  2. Labels

  3. Structures

  4. Controls

  5. An array can hold all of the above.


Correct Option: E

An array of controls can be populated by:

  1. assigning existing controls to the array.

  2. creating controls and assigning them to the array.

  3. borrowing controls that will automatically assign them to the array.

  4. Both a and b.

  5. All of the above.


Correct Option: D

AI Explanation

To answer this question, let's go through each option:

Option A) Assigning existing controls to the array - This option is correct because you can populate an array of controls by assigning existing controls to it. This means that you can take controls that already exist and add them to the array.

Option B) Creating controls and assigning them to the array - This option is correct because you can also populate an array of controls by creating new controls and assigning them to the array. This means that you can create controls dynamically and add them to the array.

Option C) Borrowing controls that will automatically assign them to the array - This option is incorrect because there is no mention of "borrowing" controls in the question. Additionally, controls cannot be automatically assigned to an array without explicit assignment.

Option D) Both a and b - This option is correct because both assigning existing controls and creating controls and assigning them to the array are valid ways to populate an array of controls.

Option E) All of the above - This option is incorrect because option C is incorrect. Controls cannot be automatically assigned to an array without explicit assignment.

Therefore, the correct answer is D) Both a and b. This option is correct because you can populate an array of controls by both assigning existing controls to the array and creating controls and assigning them to the array.

The Tag property can:

  1. only hold string values.

  2. only hold integer values.

  3. only hold Boolean values.

  4. only hold controls.

  5. hold any data defined by the programmer.


Correct Option: E

The KeyPress event will capture pressing the key:

  1. A.

  2. shift.

  3. control.

  4. Both a and b.

  5. All of the above.


Correct Option: A

Which argument in the KeyPress parameter list contains the Handled property?

  1. Sender

  2. e

  3. Object

  4. KeyPressEventArgs

  5. None of the above.


Correct Option: B

Which menu item is not typically found in the File Menu?

  1. Close

  2. Copy

  3. Exit

  4. Print

  5. Save


Correct Option: B

AI Explanation

To answer this question, you need to have knowledge of the typical items found in the File Menu. Let's go through each option to determine which one is not typically found in the File Menu:

Option A) Close - This option is typically found in the File Menu. It allows you to close the current file or application.

Option B) Copy - This option is not typically found in the File Menu. The Copy function is usually found in the Edit Menu.

Option C) Exit - This option is typically found in the File Menu. It allows you to exit or close the entire application.

Option D) Print - This option is typically found in the File Menu. It allows you to print the current file or document.

Option E) Save - This option is typically found in the File Menu. It allows you to save the changes made to the current file.

The correct answer is Option B) Copy. This option is not typically found in the File Menu, but rather in the Edit Menu.

What is the name of the control for putting menus on a form?

  1. FormMenu

  2. MenuForm

  3. MenuControl

  4. MainMenu

  5. Menu


Correct Option: D

The standard prefix for a menu item is:

  1. men.

  2. meu.

  3. mit.

  4. mni.

  5. mnu.


Correct Option: E

Which menu object property places a check mark in the display of the menu text?

  1. Check

  2. Checked

  3. CheckMark

  4. CheckOn

  5. RadioCheck


Correct Option: B

Which symbol creates an access key in the text of a menu item?

  1. @

  2. #

  3. $

  4. %

  5. &


Correct Option: E

AI Explanation

To answer this question, you need to understand how access keys are created in the text of a menu item.

Access keys are keyboard shortcuts that allow users to quickly navigate and interact with a website or application. They are typically represented by an underlined letter or number in the text of a menu item.

In HTML, the symbol used to create an access key is the ampersand (&) followed by the letter or number that represents the access key. For example, if you want to create an access key for a menu item with the letter "A", you would use "&A" in the text.

Let's go through each option to understand why it is correct or incorrect:

Option A) @ - This option is incorrect because the at symbol (@) is not used to create access keys in the text of a menu item.

Option B) # - This option is incorrect because the pound symbol (#) is not used to create access keys in the text of a menu item.

Option C) $ - This option is incorrect because the dollar symbol ($) is not used to create access keys in the text of a menu item.

Option D) % - This option is incorrect because the percent symbol (%) is not used to create access keys in the text of a menu item.

Option E) & - This option is correct because the ampersand (&) is used to create access keys in the text of a menu item. The correct answer is E.

The correct answer is E. This option is correct because the symbol '&' is used to create an access key in the text of a menu item.

- Hide questions