Deck 10: Arrays

Full screen (f)
exit full mode
Question
The first variable in a one-dimensional array is assigned a subscript of ____.

A) -1
B) 0
C) 0.1
D) 1
Use Space or
up arrow
down arrow
to flip the card.
Question
Storing data in an array decreases the efficiency of a program.
Question
Assigning initial values to an array is often referred to as ____ the array.

A) setting
B) filling
C) populating
D) initializing
Question
When declaring an array, you use either the ____ keyword.

A) ByVal, ByRef, ByNum
B) Array, As, Data
C) For, Array, Store
D) Dim, Private, or Static
Question
The following Visual Basic statement declares a ____ array. Dim cities(3) As String

A) three-element procedure-level
B) four-element procedure-level
C) three-element class-level
D) four-element class-level
Question
When you group together related variables, the group is referred to as a(n) ____.

A) constant
B) simple variable
C) scalar variable
D) array
Question
If you create a numeric array without initializing the elements of the array, the computer automatically initializes each element to ____.

A) Empty
B) Nothing
C) 0
D) 1
Question
The ____ method returns an integer that represents the highest subscript in the specified dimension in the array.

A) GetLowerBound
B) GetUpperBound
C) UpperBound
D) LowerBound
Question
Rather than having the computer use a default value to initialize each array element, you can specify each element's initial value when the array is declared.
Question
To ____ an array means to look at each array element, one by one, beginning with the first element and ending with the last element.

A) index
B) traverse
C) collapse
D) validate
Question
An array's ____ property tells you the number of elements in the array.

A) Elements
B) Size
C) Dimension
D) Length
Question
After an array is declared, you can use another statement to store a different value in an array element.
Question
Before you can use an array, you first must declare it.
Question
A simple variable is also called a(n) ____ variable.

A) scalar
B) array
C) dynamic
D) dimensional
Question
The ____ of a variable indicates the variable's position in the array.

A) subscript
B) name
C) dimension
D) column
Question
Each of the variables in an array can have a different data type.
Question
When some of the variables in a program are related to each other, it is easier and more efficient to treat the related variables as a(n) ____.

A) block
B) array
C) group
D) record
Question
The following Visual Basic statement declares and initializes a ____ array. Private states() As String = {"Hawaii", "Alaska", "Maine"}

A) zero-element class-level
B) three-element class-level
C) zero-element procedure-level
D) three-element procedure-level
Question
If the array's data type is String , each element in the array is initialized using the keyword ____.

A) Empty
B) Nothing
C) NoData
D) NoString
Question
If you create a Boolean array without initializing the elements of the array, the computer automatically initializes each element to ____.

A) True
B) Nothing
C) 0
D) False
Question
Write the code to assign the strings " Madrid ", " Paris ", " Rome ", and " London " to the first, second, third and fourth variables, respectively, contained in the first row of a two-dimensional array named cities .
Question
How do you sort the elements of a one-dimensional array in descending order?
Question
Write the statement to assign the string " Virginia " to the second element in a one-dimensional array named states .
Question
How do you refer to a variable in an array?
Question
You use the ____ method to sort the elements in a one-dimensional array in ascending order.

A) Array.Sort
B) Array.Order
C) Array.Ascending
D) Array.SmallToLarge
Question
Each element in a two-dimensional array is identified by ____ subscript(s).

A) one
B) two
C) three
D) four
Question
How do you sort the elements in a one-dimensional array in ascending order?
Question
How is each variable in a two-dimensional array identified?
Question
You can use the ____________________ statement to code a loop whose instructions you want processed for each element in a group.
Question
Write the statement to declare a six-row, four-column array of strings named cities .
Question
The ____ method sorts the elements in a one-dimensional array in descending order.

A) Array.Sort
B) Array.Order
C) Array.Reverse
D) Array.Descending
Question
Variables initialized to the ____________________ keyword contain no data at all.
Question
A variable declared in the For Each clause of the For Each...Next statement has ____ scope.

A) block
B) procedure
C) module
D) interface
Question
Explain how and why using an array in a program affects the efficiency of the program.
Question
Arrays whose elements are used to add together values are called ____________________ arrays.
Question
You use the ____________________ property to determine the number of elements stored in an array.
Question
You can visualize a one-dimensional array as a ____.

A) single variable
B) column of variables
C) table of variables
D) cube of variables
Question
A ____ is used to separate the row subscript from the column subscript in a two-dimensional array.

A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
Question
Programmers often associate the values in an array with a collection of items in a(n) ____________________.
Question
What is the difference between a one-dimensional array and a two-dimensional array?
Question
Match between columns
Unrelated to any other variable in memory
simple variable
Unrelated to any other variable in memory
array
Unrelated to any other variable in memory
subscript
Unrelated to any other variable in memory
element
Unrelated to any other variable in memory
two-dimensional array
Unrelated to any other variable in memory
one-dimensional array
Unrelated to any other variable in memory
Dim
Unrelated to any other variable in memory
Private
Unrelated to any other variable in memory
counter array
Used to declare a class-level array
simple variable
Used to declare a class-level array
array
Used to declare a class-level array
subscript
Used to declare a class-level array
element
Used to declare a class-level array
two-dimensional array
Used to declare a class-level array
one-dimensional array
Used to declare a class-level array
Dim
Used to declare a class-level array
Private
Used to declare a class-level array
counter array
Assigned by the computer when an array is created in internal memory
simple variable
Assigned by the computer when an array is created in internal memory
array
Assigned by the computer when an array is created in internal memory
subscript
Assigned by the computer when an array is created in internal memory
element
Assigned by the computer when an array is created in internal memory
two-dimensional array
Assigned by the computer when an array is created in internal memory
one-dimensional array
Assigned by the computer when an array is created in internal memory
Dim
Assigned by the computer when an array is created in internal memory
Private
Assigned by the computer when an array is created in internal memory
counter array
An array variable
simple variable
An array variable
array
An array variable
subscript
An array variable
element
An array variable
two-dimensional array
An array variable
one-dimensional array
An array variable
Dim
An array variable
Private
An array variable
counter array
A group of variables that have the same name and data type and are related in some way
simple variable
A group of variables that have the same name and data type and are related in some way
array
A group of variables that have the same name and data type and are related in some way
subscript
A group of variables that have the same name and data type and are related in some way
element
A group of variables that have the same name and data type and are related in some way
two-dimensional array
A group of variables that have the same name and data type and are related in some way
one-dimensional array
A group of variables that have the same name and data type and are related in some way
Dim
A group of variables that have the same name and data type and are related in some way
Private
A group of variables that have the same name and data type and are related in some way
counter array
Used to declare a procedure-level array
simple variable
Used to declare a procedure-level array
array
Used to declare a procedure-level array
subscript
Used to declare a procedure-level array
element
Used to declare a procedure-level array
two-dimensional array
Used to declare a procedure-level array
one-dimensional array
Used to declare a procedure-level array
Dim
Used to declare a procedure-level array
Private
Used to declare a procedure-level array
counter array
Arrays whose elements are used for counting something
simple variable
Arrays whose elements are used for counting something
array
Arrays whose elements are used for counting something
subscript
Arrays whose elements are used for counting something
element
Arrays whose elements are used for counting something
two-dimensional array
Arrays whose elements are used for counting something
one-dimensional array
Arrays whose elements are used for counting something
Dim
Arrays whose elements are used for counting something
Private
Arrays whose elements are used for counting something
counter array
Can be visualized as a table of variables
simple variable
Can be visualized as a table of variables
array
Can be visualized as a table of variables
subscript
Can be visualized as a table of variables
element
Can be visualized as a table of variables
two-dimensional array
Can be visualized as a table of variables
one-dimensional array
Can be visualized as a table of variables
Dim
Can be visualized as a table of variables
Private
Can be visualized as a table of variables
counter array
Can be visualized as a column of variables
simple variable
Can be visualized as a column of variables
array
Can be visualized as a column of variables
subscript
Can be visualized as a column of variables
element
Can be visualized as a column of variables
two-dimensional array
Can be visualized as a column of variables
one-dimensional array
Can be visualized as a column of variables
Dim
Can be visualized as a column of variables
Private
Can be visualized as a column of variables
counter array
Question
How do you traverse a two-dimensional array?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 10: Arrays
1
The first variable in a one-dimensional array is assigned a subscript of ____.

A) -1
B) 0
C) 0.1
D) 1
B
2
Storing data in an array decreases the efficiency of a program.
False
3
Assigning initial values to an array is often referred to as ____ the array.

A) setting
B) filling
C) populating
D) initializing
C
4
When declaring an array, you use either the ____ keyword.

A) ByVal, ByRef, ByNum
B) Array, As, Data
C) For, Array, Store
D) Dim, Private, or Static
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
The following Visual Basic statement declares a ____ array. Dim cities(3) As String

A) three-element procedure-level
B) four-element procedure-level
C) three-element class-level
D) four-element class-level
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
When you group together related variables, the group is referred to as a(n) ____.

A) constant
B) simple variable
C) scalar variable
D) array
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
If you create a numeric array without initializing the elements of the array, the computer automatically initializes each element to ____.

A) Empty
B) Nothing
C) 0
D) 1
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
The ____ method returns an integer that represents the highest subscript in the specified dimension in the array.

A) GetLowerBound
B) GetUpperBound
C) UpperBound
D) LowerBound
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
Rather than having the computer use a default value to initialize each array element, you can specify each element's initial value when the array is declared.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
To ____ an array means to look at each array element, one by one, beginning with the first element and ending with the last element.

A) index
B) traverse
C) collapse
D) validate
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
An array's ____ property tells you the number of elements in the array.

A) Elements
B) Size
C) Dimension
D) Length
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
After an array is declared, you can use another statement to store a different value in an array element.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
Before you can use an array, you first must declare it.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
A simple variable is also called a(n) ____ variable.

A) scalar
B) array
C) dynamic
D) dimensional
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
The ____ of a variable indicates the variable's position in the array.

A) subscript
B) name
C) dimension
D) column
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
Each of the variables in an array can have a different data type.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
When some of the variables in a program are related to each other, it is easier and more efficient to treat the related variables as a(n) ____.

A) block
B) array
C) group
D) record
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
The following Visual Basic statement declares and initializes a ____ array. Private states() As String = {"Hawaii", "Alaska", "Maine"}

A) zero-element class-level
B) three-element class-level
C) zero-element procedure-level
D) three-element procedure-level
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
If the array's data type is String , each element in the array is initialized using the keyword ____.

A) Empty
B) Nothing
C) NoData
D) NoString
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
If you create a Boolean array without initializing the elements of the array, the computer automatically initializes each element to ____.

A) True
B) Nothing
C) 0
D) False
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
Write the code to assign the strings " Madrid ", " Paris ", " Rome ", and " London " to the first, second, third and fourth variables, respectively, contained in the first row of a two-dimensional array named cities .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
How do you sort the elements of a one-dimensional array in descending order?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Write the statement to assign the string " Virginia " to the second element in a one-dimensional array named states .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
How do you refer to a variable in an array?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
You use the ____ method to sort the elements in a one-dimensional array in ascending order.

A) Array.Sort
B) Array.Order
C) Array.Ascending
D) Array.SmallToLarge
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
Each element in a two-dimensional array is identified by ____ subscript(s).

A) one
B) two
C) three
D) four
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
How do you sort the elements in a one-dimensional array in ascending order?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
How is each variable in a two-dimensional array identified?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
You can use the ____________________ statement to code a loop whose instructions you want processed for each element in a group.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
Write the statement to declare a six-row, four-column array of strings named cities .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ method sorts the elements in a one-dimensional array in descending order.

A) Array.Sort
B) Array.Order
C) Array.Reverse
D) Array.Descending
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
Variables initialized to the ____________________ keyword contain no data at all.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
A variable declared in the For Each clause of the For Each...Next statement has ____ scope.

A) block
B) procedure
C) module
D) interface
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
Explain how and why using an array in a program affects the efficiency of the program.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
Arrays whose elements are used to add together values are called ____________________ arrays.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
You use the ____________________ property to determine the number of elements stored in an array.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
You can visualize a one-dimensional array as a ____.

A) single variable
B) column of variables
C) table of variables
D) cube of variables
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
A ____ is used to separate the row subscript from the column subscript in a two-dimensional array.

A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
Programmers often associate the values in an array with a collection of items in a(n) ____________________.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
What is the difference between a one-dimensional array and a two-dimensional array?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
Unrelated to any other variable in memory
simple variable
Unrelated to any other variable in memory
array
Unrelated to any other variable in memory
subscript
Unrelated to any other variable in memory
element
Unrelated to any other variable in memory
two-dimensional array
Unrelated to any other variable in memory
one-dimensional array
Unrelated to any other variable in memory
Dim
Unrelated to any other variable in memory
Private
Unrelated to any other variable in memory
counter array
Used to declare a class-level array
simple variable
Used to declare a class-level array
array
Used to declare a class-level array
subscript
Used to declare a class-level array
element
Used to declare a class-level array
two-dimensional array
Used to declare a class-level array
one-dimensional array
Used to declare a class-level array
Dim
Used to declare a class-level array
Private
Used to declare a class-level array
counter array
Assigned by the computer when an array is created in internal memory
simple variable
Assigned by the computer when an array is created in internal memory
array
Assigned by the computer when an array is created in internal memory
subscript
Assigned by the computer when an array is created in internal memory
element
Assigned by the computer when an array is created in internal memory
two-dimensional array
Assigned by the computer when an array is created in internal memory
one-dimensional array
Assigned by the computer when an array is created in internal memory
Dim
Assigned by the computer when an array is created in internal memory
Private
Assigned by the computer when an array is created in internal memory
counter array
An array variable
simple variable
An array variable
array
An array variable
subscript
An array variable
element
An array variable
two-dimensional array
An array variable
one-dimensional array
An array variable
Dim
An array variable
Private
An array variable
counter array
A group of variables that have the same name and data type and are related in some way
simple variable
A group of variables that have the same name and data type and are related in some way
array
A group of variables that have the same name and data type and are related in some way
subscript
A group of variables that have the same name and data type and are related in some way
element
A group of variables that have the same name and data type and are related in some way
two-dimensional array
A group of variables that have the same name and data type and are related in some way
one-dimensional array
A group of variables that have the same name and data type and are related in some way
Dim
A group of variables that have the same name and data type and are related in some way
Private
A group of variables that have the same name and data type and are related in some way
counter array
Used to declare a procedure-level array
simple variable
Used to declare a procedure-level array
array
Used to declare a procedure-level array
subscript
Used to declare a procedure-level array
element
Used to declare a procedure-level array
two-dimensional array
Used to declare a procedure-level array
one-dimensional array
Used to declare a procedure-level array
Dim
Used to declare a procedure-level array
Private
Used to declare a procedure-level array
counter array
Arrays whose elements are used for counting something
simple variable
Arrays whose elements are used for counting something
array
Arrays whose elements are used for counting something
subscript
Arrays whose elements are used for counting something
element
Arrays whose elements are used for counting something
two-dimensional array
Arrays whose elements are used for counting something
one-dimensional array
Arrays whose elements are used for counting something
Dim
Arrays whose elements are used for counting something
Private
Arrays whose elements are used for counting something
counter array
Can be visualized as a table of variables
simple variable
Can be visualized as a table of variables
array
Can be visualized as a table of variables
subscript
Can be visualized as a table of variables
element
Can be visualized as a table of variables
two-dimensional array
Can be visualized as a table of variables
one-dimensional array
Can be visualized as a table of variables
Dim
Can be visualized as a table of variables
Private
Can be visualized as a table of variables
counter array
Can be visualized as a column of variables
simple variable
Can be visualized as a column of variables
array
Can be visualized as a column of variables
subscript
Can be visualized as a column of variables
element
Can be visualized as a column of variables
two-dimensional array
Can be visualized as a column of variables
one-dimensional array
Can be visualized as a column of variables
Dim
Can be visualized as a column of variables
Private
Can be visualized as a column of variables
counter array
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
How do you traverse a two-dimensional array?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.