Deck 10: Arrays
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 10: Arrays
1
A two-dimensional array resembles a table with rows and columns.
True
2
In a two-dimensional array with r rows and c columns, the index values for the last row and last column would be (r, c).
False
3
An array increases program efficiency by storing data on disk.
False
4
The data used to initialize the elements of an array must be enclosed in brackets.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
A variable that is related to other variables and has the same name and data type is called a scalar variable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
In a two-dimensional array the first row will have an index or subscript value of zero.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Parallel arrays are two sets of data that are directly related to each other.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
To sort the data in an array in ascending order, you use the Array.Sequence( ) method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
The most commonly used arrays are one-dimensional and two-dimensional.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
The subscript value of -1 can never be used to reference any element in a two-dimensional array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Each element of a two-dimensional array requires two subscripts to refer to that location.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A pointer is a unique number that is used to reference or identify each variable in an array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The subscript value, variable or constant, must be enclosed in braces following the array name.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
In a two-dimensional array the first column will have an index or subscript value of zero.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
A simple variable is not related to any other memory variable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Parallel arrays are two or more arrays whose elements are related by their position in the array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
To sort an array in descending order you would use the Array.Descending( ) method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The For Each…Next statement can be used to code a loop whose instructions are processed for each array variable in an array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The Length property of an array contains the number of elements in the array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Each of the elements in an array has the same data type.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
If an array is sorted in descending order, in which index value is the largest element located?
A) 0
B) 1
C) n-1
D) n
A) 0
B) 1
C) n-1
D) n
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
You use the keyword Private to create a procedure-level structure variable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
A module-level array is declared in the form's Declarations section.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
If an array is sorted in ascending order, in which index value is the largest element located?
A) 0
B) 1
C) n-1
D) n
A) 0
B) 1
C) n-1
D) n
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Variables included as members in a structure are called member variables.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
To reference a single variable in the first row and first column in a two-dimensional array you will use the ____ symbols.
A) (0, 0)
B) {0, 0}
C) (1, 1)
D) {1, 1}
A) (0, 0)
B) {0, 0}
C) (1, 1)
D) {1, 1}
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
The following statement will declare an array that has ____ elements. Dim lakes(5)
A) 4
B) 5
C) 6
D) 7
A) 4
B) 5
C) 6
D) 7
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Consider the following array numbers( , )={{1,2},{3,4},{4,5},{6,7},{8,9}}. What value will the following expression yield for total? total = numbers(1, 1) + numbers(2,0)
A) 4
B) 6
C) 8
D) 12
A) 4
B) 6
C) 8
D) 12
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The data used to initialize the elements of an array are enclosed in ____.
A) [ ]
B) { }
C) ( )
D) " "
A) [ ]
B) { }
C) ( )
D) " "
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The Structure statement ends with the Exit Structure clause.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The following statement will declare an array. What is the index value for the first element? Dim lakes(5)
A) 0
B) 1
C) 4
D) 5
A) 0
B) 1
C) 4
D) 5
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
Which column is referenced: sales(2, 3) ?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
To arrange the elements in an array in ascending order you use the ____ method.
A) Array.Arrange( )
B) Array.Ascending( )
C) Array.Sort( )
D) Array.Arrange()
A) Array.Arrange( )
B) Array.Ascending( )
C) Array.Sort( )
D) Array.Arrange()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
If an array is sorted in descending order, in which index value is the smallest element located?
A) 0
B) 1
C) n-1
D) n
A) 0
B) 1
C) n-1
D) n
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Which row is referenced: sales(2, 3) ?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
To sort a one-dimensional array in descending order, you first use the Array.Sort method and then use the ____ method.
A) Array.Arrange( )
B) Array.Reverse( )
C) Array.Sort( )
D) Array.Descending()
A) Array.Arrange( )
B) Array.Reverse( )
C) Array.Sort( )
D) Array.Descending()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Only variables can be included as members in a structure.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Two arrays where information is directly related to each other are called ____ arrays.
A) direct
B) serial
C) sequential
D) parallel
A) direct
B) serial
C) sequential
D) parallel
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
The individual variables in an array can be referenced by enclosing the subscript in ____.
A) [ ]
B) { }
C) ( )
D) " "
A) [ ]
B) { }
C) ( )
D) " "
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Consider the following array: numbers( , )={{1,2},{3,4},{4,5},{6,7},{8,9}} What row index value is required to create this two-dimensional array?
A) 2
B) 3
C) 4
D) 5
A) 2
B) 3
C) 4
D) 5
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
An array called state() is loaded as follows: Dim state()={"Ohio", "Michigan", "California", "Arizona"} What is the subscript value to reference Arizona?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Which of the following shows the correct syntax for entering data into a two-dimensional array?
A) arrayname(rowSubscript, columnSubscript) = rowValue, columnValue
B) arrayname(rowSubscript, columnSubscript) = value
C) arrayname(rowSubscript, columnSubscript) = {rowValue, columnValue}
D) arrayname(rowSubscript, columnSubscript) = {value}
A) arrayname(rowSubscript, columnSubscript) = rowValue, columnValue
B) arrayname(rowSubscript, columnSubscript) = value
C) arrayname(rowSubscript, columnSubscript) = {rowValue, columnValue}
D) arrayname(rowSubscript, columnSubscript) = {value}
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Assigning initial values to an array is often referred to as ____ the array.
A) declaring
B) passing
C) grouping
D) populating
A) declaring
B) passing
C) grouping
D) populating
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Consider the following array: numbers( , )={{1,2},{3,4},{4,5},{6,7},{8,9}} What is the row index value of the largest value in this two-dimension array?
A) 2
B) 3
C) 4
D) 5
A) 2
B) 3
C) 4
D) 5
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
An array is defined as follows: Dim numbers(3) As Integer How many elements does the array have?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
User-defined data types are also known as ____.
A) structures
B) groups
C) arrays
D) elements
A) structures
B) groups
C) arrays
D) elements
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
You can create your own data types in Visual Basic .NET using the ____ statement.
A) Array
B) Data Type
C) Structure
D) Group
A) Array
B) Data Type
C) Structure
D) Group
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Which of the following correctly shows the syntax for storing data into a one-dimensional array?
A) arrayname = value
B) arrayname(subscript) = value
C) arrayname = {value}
D) arrayname(subscript) = {value}
A) arrayname = value
B) arrayname(subscript) = value
C) arrayname = {value}
D) arrayname(subscript) = {value}
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
In a structure, each member variable's definition contains the keyword ____ followed by the name of the variable.
A) Private
B) Protected
C) Public
D) Friend
A) Private
B) Protected
C) Public
D) Friend
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
An array called state() is loaded with the following statement: Dim state()={"Ohio", "Michigan", "California", "Arizona"} What state name will display when the statement Debug.WriteLine(state(1)) is executed?
A) Ohio
B) Michigan
C) California
D) Arizona
A) Ohio
B) Michigan
C) California
D) Arizona
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck