Question: Question 1 (2 points) In the array declaration below, what is the significance of the number 7? Dim strNames(7) As String Question 1 options: It's

Question 1 (2 points)

Question 1 (2 points) In the array declaration below, what is the

In the array declaration below, what is the significance of the number 7? Dim strNames(7) As String

Question 1 options:

It's the upper bound (highest subscript value) of the array.

It's one greater than the upper bound of the array.

It indicates the number of elements in the array.

It's the value assigned to the array elements.

Save

Question 2 (2 points)

significance of the number 7? Dim strNames(7) As String Question 1 options:

What is the error in the following code, and when will it be caught? Dim intValues(5) As Integer Dim intIndex As Integer For intIndex = 0 To 10 It's the upper bound (highest subscript value) of the array. It's one intValues(intIndex) = 10 Next intIndex

Question 2 options:

The For...Next loop values for intIndex should range from 1 to 5. The error will occur at compile time.

The loop should close with Next instead of Next intIndex. The error will occur at compile time.

The For...Next loop values for intIndex should range from 1 to 10. The error will occur at run time.

An IndexOutOfRangeException will be thrown.

Save

Question 3 (2 points)

greater than the upper bound of the array. It indicates the number

The lowest possible subscript of an array is ________.

Question 3 options:

0

There is no limit

1

?1

Save

Question 4 (2 points)

of elements in the array. It's the value assigned to the array

Which of the following could be used to iterate through each element of a two-dimensional array.

Question 4 options:

A single ForNext loop

Nested ForNext loops

A single Do While loop

A single Do Until loop

Save

Question 5 (2 points)

elements. Save Question 2 (2 points) What is the error in the

Which statement is not true about the following array? Dim strFriends() As String = { "Rose", "Bud", "Flower", "Spring" }

Question 5 options:

The String "Flower" is located at index position 2.

All elements have been assigned values.

The array has an unlimited number of elements.

All of these are true statements about the array.

Save

Question 6 (2 points)

following code, and when will it be caught? Dim intValues(5) As Integer

Which of the following code segments creates a new file named address.txt, writes the following two lines to the file, and then closes the file? Bob Johnson Somewhere USA

Question 6 options:

Dim addressFile As System.IO.StreamWriter addressFile = System.IO.File.CreateText("address.txt") addressFile.WriteLine("Bob Johnson") addressFile.WriteLine("Somewhere USA") addressFile.Close()

Dim addressFile As System.IO addressFile = System.IO.File.CreateText("address.txt") addressFile.WriteLine("Bob Johnson") addressFile.WriteLine("Somewhere USA") addressFile.Close()

Dim addressFile As System.IO.StreamWriter addressFile = System.IO.File.CreateText("address.txt") addressFile.Write("Bob Johnson") addressFile.Write("Somewhere USA") address.txt.Close()

Dim addressFile As StreamWriter addressFile = System.IO.File.CreateText("address.txt") addressFile.PrintLine("Bob Johnson") addressFile.PrintLine("Somewhere USA") Close()

Save

Question 7 (2 points)

Dim intIndex As Integer For intIndex = 0 To 10 intValues(intIndex) =

The StreamReader object's ________ is used to determine when the end of the file has been reached.

Question 7 options:

EOF flag

FileEnd flag

Poke method

EndOfStream property

Save

Question 8 (2 points)

10 Next intIndex Question 2 options: The For...Next loop values for intIndex

An application must first ________ a file before it can be used.

Question 8 options:

read from

write to

unlock

open

Save

Question 9 (2 points)

should range from 1 to 5. The error will occur at compile

A structure should be used instead of an array when ________.

Question 9 options:

related items contain strings of different lengths

related items should be grouped together

there are a limited number of related items

related items are of different data types

Save

Question 10 (2 points)

time. The loop should close with Next instead of Next intIndex. The

When a VB application executes, its ________ is automatically displayed.

Question 10 options:

form load event

event procedure

startup form

main sub

Save

Question 11 (2 points)

error will occur at compile time. The For...Next loop values for intIndex

Which of the following statements disables the Copy menu item named mnuCopy?

Question 11 options:

mnuCopy.Enabled = False

mnuCopy.Disabled = True

mnuCopy.Active = False

mnuCopy.Disable

Save

Question 12 (2 points)

should range from 1 to 10. The error will occur at run

When a ________ form is displayed, no other form in the application can receive the focus until the form is closed.

Question 12 options:

modeless

hidden

modal

show

Save

Question 13 (2 points)

time. An IndexOutOfRangeException will be thrown. Save Question 3 (2 points) The

In order to prevent users from accessing a menu item, set the item's ________ property to ________.

Question 13 options:

Enabled, False

Active, False

Disabled, True

Hidden, True

Save

Question 14 (2 points)

lowest possible subscript of an array is ________. Question 3 options: 0

Which of the following statements most accurately describes the Me keyword?

Question 14 options:

The Me keyword provides access to the controls of a form without naming the specific control.

The Me keyword refers to the current instance of the form.

The Me.Close() statement calls the Close method of a form named Me.

Me is another name for the Form Load event procedure.

Save

Question 15 (2 points)

There is no limit 1 ?1 Save Question 4 (2 points) Which

Choose the statement below that performs the comment found on line 2 of the following code segment. Dim newStudentForm As New frmNewStudent() Initialize AcademicYear text box on NewStudent form to 1 newStudentForm.ShowDialog()

Question 15 options:

txtAcademicYear.Text.newStudentForm = "1"

frmNewStudent.txtAcademicYear.Text = "1"

txtAcademicYear.frmNewStudent = "1"

newStudentForm.txtAcademicYear.Text = "1"

Save

Question 16 (2 points)

of the following could be used to iterate through each element of

Values in an array are stored and worked with using a ________.

Question 16 options:

method

element locator

subscript

locator

Save

Question 17 (2 points)

a two-dimensional array. Question 4 options: A single ForNext loop Nested ForNext

Which of the following is the correct definition for a procedure that accepts a String array as an argument?

Question 17 options:

Private Sub ArrayParam(ByVal strStudents As String)

Sub ArrayParam(ByVal strStudents() As String)

Private Sub ArrayParam(ByRef strStudents As String)

Public Sub ArrayParam(ByVal strStudents())

Save

Question 18 (2 points)

loops A single Do While loop A single Do Until loop Save

Which of the following statements defines a two-dimensional Integer array named intTwoDArray with 6 rows and 4 columns?

Question 18 options:

Dim intTwoDArray(6, 4) As Integer

Dim intTwoDArray(3, 5) As Integer

Dim intTwoDArray(4, 6) As Integer

Dim intTwoDArray(5, 3) As Integer

Save

Question 19 (2 points)

Question 5 (2 points) Which statement is not true about the following

Which of the following provides the index of the highest numbered element of the array strNames?

Question 19 options:

strNames.Length - 1

strNames.Length

strNames.Length + 1

None of these

Save

Question 20 (2 points)

array? Dim strFriends() As String = { "Rose", "Bud", "Flower", "Spring" }

Due to their similarities, it's easy to create a parallel relationship between an array and a ________.

Question 20 options:

GroupBox

ComboBox

RadioButton

TextBox

Save

Question 21 (2 points)

Question 5 options: The String "Flower" is located at index position 2.

Which type of loop is designed specifically to use a subscript to access the elements of an array?

Question 21 options:

ForNext

Do While

For While

Do Until

Save

Question 22 (2 points)

All elements have been assigned values. The array has an unlimited number

A ________ file is like a stream of data that must be read from its beginning to its end.

Question 22 options:

sequential access

binary format

direct access

direct format

Save

Question 23 (2 points)

of elements. All of these are true statements about the array. Save

Which of the following statements are not true about text files?

Question 23 options:

contains plain text

known as a sequential-access file

cannot be viewed with an editor such as Notepad

is the simplest type of data file

Save

Question 24 (2 points)

Question 6 (2 points) Which of the following code segments creates a

The StreamWriter's CreateText method will ________.

Question 24 options:

maintain the data for an existing file

create a new file or replace an existing one

insert text at the beginning of the file

append text at the end of the existing file

Save

Question 25 (2 points)

new file named address.txt, writes the following two lines to the file,

This method is used to add more data to the end of an existing file.

Question 25 options:

System.IO.File.AppendText

System.IO.File.CreateText

System.IO.File.OpenNew

System.IO.File.OpenText

Save

Question 26 (3 points)

and then closes the file? Bob Johnson Somewhere USA Question 6 options:

Question 26 options:

Jim's mother has three children named April, May, and ___________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!