Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
|
1.
|
To access the 9th element in an array the ____ index is used.
|
|
|
2.
|
The ____ keyword is used to declare an array.
a. | DimArray | c. | InitArray | b. | Array | d. | Dim |
|
|
|
3.
|
Select the correct syntax to declare an array named intReservations with 10
Integer elements.
a. | Dim intReservations(9) as Integer | c. | Dim intReservations[9] as
Integer | b. | Dim intReservations(10) as Integer | d. | Dim intReservations[10] as
Integer |
|
|
|
4.
|
The elements in a string type array will be initialized to ____.
|
|
|
5.
|
The elements in an integer type array will be initialized to ____.
|
|
|
6.
|
If an element is referenced using an index that is not in the bounds of the
array, a(n) ____ error occurs.
a. | IndexOutOfBoundsException | c. | IndexInvalidException | b. | IndexOutOfRangeException | d. | InvalidIndexException |
|
|
|
7.
|
The ____ keyword is used to change the upper bound of an array.
a. | ReBound | c. | ReDim | b. | ReSize | d. | ReInit |
|
|
|
|
|
|
8.
|
As shown in the accompanying figure, the ____ keyword will save existing data
when resizing an array to a larger size.
a. | Preserve | c. | As | b. | Save | d. | ReDim |
|
|
|
9.
|
The ____ loop can be used to process each element of an array.
a. | For Element | c. | For Each | b. | For Array | d. | For Value |
|
|
|
10.
|
To apply the sort procedure to an array called intAges, use the syntax
____.
a. | Sort(intAges) | c. | ArraySort(intAges) | b. | Sort.Array(.intAges) | d. | Array.Sort(intAges) |
|
|
|
11.
|
The array ____ procedure is used to organize elements in an array according to
their values.
a. | Organize | c. | Arrange | b. | Order | d. | Sort |
|
|
|
12.
|
The BinarySearch procedure returns ____ if the desired value is found in the
array.
a. | the element’s value | c. | 1 | b. | the matching index
value | d. | -1 |
|
|
|
13.
|
To store the values contained in a table, you would use a ____ array.
a. | parallel | c. | two-dimensional | b. | grid | d. | three-dimensional |
|
|
|
14.
|
The ____ file extension indicates a text file.
|
|
|
15.
|
In Visual Basic, an array can have up to ____ dimensions.
|
|
|
16.
|
Text data can be stored in a(n) ____ file.
a. | sequential | c. | archival | b. | dynamic | d. | encoded |
|
|
|
17.
|
The ____ object is used to access information in a text file.
a. | Reader | c. | Streamer | b. | TextReader | d. | StreamReader |
|
|
|
18.
|
The ____ method of a StreamReader object should be used to read the next
character in a file without changing position in the file.
a. | CheckNext | c. | PeekNext | b. | Peek | d. | TestNext |
|
|
|
19.
|
The ____ object is used to store data into a text file.
a. | TextSave | c. | Streamer | b. | StreamSave | d. | StreamWriter |
|
|
|
20.
|
Every application begins executing a project by displaying the object designated
as the ____ object.
a. | Initial | c. | Primary | b. | Startup | d. | Main |
|
|
|
21.
|
A ____ form retains the input focus while open so that the user cannot switch
between Form objects until the first form is closed.
a. | modal | c. | focused | b. | modeless | d. | forced |
|
|
|
22.
|
The ____ procedure takes a form out of view.
a. | Remove | c. | Hide | b. | Minimize | d. | Vanish |
|
|
|
23.
|
Command lines placed after the ____ method call are not executed until the
second Form object is closed.
a. | ShowModal | c. | OpenModal | b. | ShowDialog | d. | ShowModeless |
|
|
|
24.
|
A(n) ____ form allows users to switch to other forms within the application
while its open.
a. | modal | c. | unfocused | b. | modeless | d. | forced |
|
|
|
25.
|
In applications that include multiple forms, it is best to declare every
variable as a ____ variable unless the variable is used in multiple Form objects.
a. | Private | c. | Locked | b. | Hidden | d. | Unique |
|
True/False Indicate whether the
statement is true or false.
|
|
|
26.
|
An array variable can store more than one value.
|
|
|
27.
|
An array element is accessed by using the array name and the element’s
index or subscript.
|
|
|
28.
|
An array variable can store a maximum of 5 values at a time.
|
|
|
29.
|
An element is an individual item in an array.
|
|
|
30.
|
Array indexes are numbered in a zero-relative manner.
|
|
|
31.
|
Arrays cannot be initialized by assigning values to each element.
|
|
|
32.
|
The term parallel array has the same meaning as the term two-dimensional
array.
|
|
|
33.
|
When declaring an implicitly sized array, declaring an upper-bound index will
cause an error to occur.
|
|
|
34.
|
Parallel arrays store related data in two or more arrays.
|
|
|
35.
|
The number of values in an implicitly sized array is determined at
execution.
|
|
|
36.
|
An array with an upper-bound index declared is not implicitly sized.
|
|
|
37.
|
When an array is initialized, no default values are automatically assigned to
the elements.
|
|
|
38.
|
An array can hold only integer or string type values.
|
|
|
39.
|
When an element is added to an array using an index that exceeds the upper bound
of the array, the array automatically resizes itself to contain the new data.
|
|
|
40.
|
An array subscript cannot be less than 0.
|
|
|
41.
|
When using the Preserve keyword to redimension an array to a smaller size, a
separate array of elements will be made to store the values that were truncated from the end of the
array.
|
|
|
42.
|
A dynamic array’s values can change, but its size cannot change at run
time.
|
|
|
43.
|
The ReDim statement can be used to change the size of an array.
|
|
|
44.
|
All Visual Basic arrays are considered dynamic arrays.
|
|
|
45.
|
The Length property returns the highest index element in the array.
|
|
|
46.
|
A For Each loop will execute a loop that effects each array in the
program.
|
|
|
47.
|
When using a For Each loop to process each element in an array, you must specify
the number of iterations for the loop.
|
|
|
48.
|
As with other variables, an array declared as a class level variable is visible
to all procedures within the class.
|
|
|
49.
|
An array declared within a procedure is accessible outside that
procedure.
|
|
|
50.
|
When passing an array ByVal to a Sub or Function procedure, the original array
may be changed by the procedure.
|
|
|
51.
|
An array can be returned as a result from a function.
|
|
|
52.
|
When the Sort procedure is applied to an array, the lowest value is placed in
the first element.
|
|
|
53.
|
A sequential search is the most efficient way of searching for an
element.
|
|
|
54.
|
The BinarySearch method requires that the array is already sorted to produce
correct results.
|
|
|
55.
|
Two-dimensional arrays store the elements of tables.
|
|
|
56.
|
An array with two index values for each element is a two-dimensional
array.
|
|
|
57.
|
A nested loop can be used to process all of the elements in a two-dimensional
array.
|
|
|
58.
|
An array can have a maximum of 3 dimensions.
|
|
|
59.
|
A simple text file is called a sequential file.
|
|
|
60.
|
The Peek procedure of a StreamReader object will return –1 when the end of
the file has been reached.
|
|
|
61.
|
A Windows application can only contain one Windows Form object.
|
|
|
62.
|
The Startup object is the first object that is displayed when the application
begins executing.
|
|
|
63.
|
When a form is displayed as modal, no other forms in the application can be
accessed by the user until the form is closed.
|
|
|
64.
|
When the ShowDialog procedure of a Form object is used, command execution is
paused until the form is closed.
|
|
|
65.
|
An instance is a special type of form that can be loaded with another form still
showing.
|
|
|
66.
|
The ShowDialog procedure of a Form object loads a form as modal.
|
|
|
67.
|
The Hide procedure of a Form object removes the form from view.
|
|
|
68.
|
When a form is loaded as modeless, other forms in the application can be
accessed by the user.
|
|
|
69.
|
The Show procedure of a Form object loads a form as modal.
|
|
|
70.
|
An access specifier determines the availability of a variable to other parts of
the application.
|
|
|
71.
|
Modeless forms are used more often that modal forms in Windows
Applications.
|
|
|
72.
|
A variable’s access specifier determines what other forms may access
it.
|
|
|
73.
|
By using the Public Common access specifier, the variable’s values are
shared across all objects within an application.
|
|
|
74.
|
In applications that include multiple forms, it is best to declare as few
Private variables as possible.
|
|
|
75.
|
Objects on a form cannot be referenced from any other form.
|
Completion Complete each
statement.
|
|
|
76.
|
____________________ is an accounting term used to describe the decline in an
asset’s value over a certain period of time.
|
|
|
77.
|
A(n) ____________________ variable is a variable that can store more than one
value.
|
|
|
78.
|
Each ____________________ in an array contains a value.
|
|
|
79.
|
Arrays provide access to data by using a numeric ____________________ to
identify the desired element.
|
|
|
80.
|
When an array is declared, the numeric value specified in parentheses is the
____________________ index, or the highest numbered index of the array.
|
|
|
81.
|
____________________ arrays store related data in two or more arrays.
|
|
|
82.
|
____________________ sized arrays are not initialized with a set size, but
instead are sized at execution to accommodate the listed values.
|
|
|
83.
|
Arrays that are ____________________ can be resized at run time.
|
|
|
84.
|
The ____________________ statement is used to change the size of an array at run
time.
|
|
|
85.
|
The ____________________ keyword is used to keep the existing data inside an
array when the array is resized to a larger size.
|
|
|
86.
|
The ____________________ property of an array contains the number of elements in
an array.
|
|
|
87.
|
The ____________________ loop is a special loop designed specifically to process
every element in an array.
|
|
|
88.
|
An array can be returned from a(n) ____________________ procedure.
|
|
|
89.
|
The array procedure ____________________ arranges the elements in an array from
the smallest value to the largest.
|
|
|
90.
|
A(n) ____________________ search of an array starts at the beginning of the
array and inspects each element until a match is found.
|
|
|
91.
|
The ____________________ method repeatedly divides the search interval of an
array in half to dramatically reduce searching time.
|
|
|
92.
|
An array with two indexes for each element is a(n) ____________________
array.
|
|
|
93.
|
A simple text file is called a(n) ____________________ file.
|
|
|
94.
|
The ____________________ object is used to read text from a file into the
program.
|
|
|
95.
|
The IO.File.____________________ procedure checks if a file is available.
|
|
|
96.
|
The IO.File.____________________ procedure opens a text file so that it can be
used by other objects in the program.
|
|
|
97.
|
The ____________________ procedure of the StreamReader class is used to read a
line of text from a file.
|
|
|
98.
|
The ____________________ procedure of the StreamReader object returns the next
character in the file without changing position.
|
|
|
99.
|
The ____________________ object is used to write lines of text to a file.
|
|
|
100.
|
The System.IO ____________________ includes the StreamWriter, which is used to
write a stream of text to a file.
|
|
|
101.
|
____________________ depreciation is calculated by dividing the purchase or
acquisition price of an asset by the life of the asset.
|
|
|
102.
|
A(n) ____________________ is an object variable that references the class name
to access the object’s procedures and properties.
|
|
|
103.
|
The ____________________ procedure of a Form object loads another form, hides
the existing form and stops execution of code on the hidden form until this form is closed.
|
|
|
104.
|
To remove a form from view, the ____________________ procedure of the Form
object is used.
|
|
|
|
|
|
105.
|
The code in the accompanying figure shows a(n) ____________________ procedure,
which is one that retains the input focus while open and does not allow the user to switch to other
forms within the application.
|
|
|
106.
|
The ____________________ procedure of a Form object loads a form without
restricting the use of other forms in the application.
|
|
|
107.
|
A form that is shown as ____________________ allows the user to switch to other
forms in the application.
|
|
|
108.
|
The ____________________ keyword on the declaration of a class-level variable
prevents another form from accessing that variable.
|
|
|
109.
|
The access ____________________ (or access specifier) determines what code has
permission to read or write to the variable.
|
|
|
110.
|
If a variable is declared with the Public ____________________ specifier, it can
be used by other classes within the application.
|