Deck 5: Arrays

Full screen (f)
exit full mode
Question
Arrays are always composed of elements of the same data ____.

A)type
C)method
B)style
D)mode
Use Space or
up arrow
down arrow
to flip the card.
Question
Some programmers refer to an array as a table, or a ____.

A)catalog
C)matrix
B)template
D)list
Question
A ____, also called an index, is a number that indicates the position of a particular item within an array.

A)superscript
C)placeholder
B)key
D)subscript
Question
An error commonly made by beginning programmers is to forget that array subscripts start with the integer 1.
Question
As with a while loop, when you use a for loop, you must be careful to stay within array bounds, remembering that the highest usable array subscript is one less than the size of the array.
Question
Depending on the syntax rules of the programming language you use, you place the subscript within parentheses or square brackets following the group name.
Question
Many programming languages allow you to initialize an array with fewer values than there are array elements declared.
Question
Sometimes the values stored in arrays should be constants.
Question
Leaving a loop as soon as a match is found improves the program's efficiency.
Question
Any array's subscripts are always a sequence of ____.

A)alphanumeric characters
C)links
B)symbols
D)integers
Question
If you store important papers in a series of file folders and label each folder with a consecutive letter of the alphabet, then you are using the equivalent of an array.
Question
Whenever you require ____ storage locations for objects, you are using a real-life counterpart of a programming array.

A)multiple
C)stacked
B)fixed
D)expandable
Question
A flag is a variable you set to indicate whether some event occurred.
Question
Each variable within an array has the same name and the same data type.
Question
What is another word for a subscript?

A)superscript
C)variable
B)subroutine
D)index
Question
Parallel arrays are two arrays such that each element in one array is associated with the element in the same relative position in the other array.
Question
Each separate array variable is one ____ of an array.

A)element
C)factor
B)block
D)aspect
Question
All array elements have the same ____ name, but each individual element also has a unique subscript indicating how far away it is from the first element.

A)variable
C)superscript
B)group
D)value
Question
A(n) ____ is a series or list of variables in computer memory, all of which have the same name and data type but are differentiated with special numbers called subscripts.

A)collection
C)script
B)array
D)group
Question
Each array element occupies an area in memory next to, or ____, the others.

A)coupled with
C)contiguous to
B)associated with
D)parallel with
Question
Providing array values is also called ____________________ the array.
Question
In Visual Basic, if you declare an array named count, its size is stored in what constant?

A)count.size
C)count.length
B)count.Length
D)count.ElementNumber
Question
The ____________________ is considered to be one of the most useful data structures.
Question
Two corresponding arrays are known as ____ arrays when each element in one array is associated with the element in the same relative position in the other array.
a.perpendicular
c.similar
b.parallel
d.
Question
Using an array is never ____.

A)mandatory
C)a good idea
B)optional
D)easy to understand
Question
A ____ is a variable that you set to indicate whether some event has occurred.

A)banner
C)sentinel
B)sentry
D)flag
Question
In C++ and C#, which type of punctuation is used to hold the array's subscript following the group name?

A)square brackets
C)parenthesis
B)asterisks
D)quotes
Question
When you use a subscript not within the range of acceptable subscripts, your subscript is said to be ____.

A)out of range
C)out of bounds
B)out of area
D)out of series
Question
To access an array element in Java, you place the subscript inside ____________________.
Question
The highest usable array subscript is ____.

A)twice the size of the array
C)one more than the size of the array
B)the size of the array
D)one less than the size of the array
Question
matching
ANS: B PTS: 1 REF: 175
Leaving a loop as soon as a match is found ____ a program's efficiency.

A)worsens
C)doesn't change
B)improves
D)defines
Question
When you declare an array, you provide a(n) ____ name for a number of associated variables in memory.

A)permanent
C)group
B)immutable
D)standard
Question
Every array has a(n) ____ size.

A)finite
C)indefinite
B)infinite
D)large
Question
Initializing an array with a number of elements ____ the array's size is not allowed in any programming language.

A)fewer than
C)greater than or equal to
B)more than
D)less than or equal to
Question
An array can best be used to replace what type of structure?

A)flowchart
C)sequence
B)selection
D)nested decision
Question
A(n) ____ is the process of searching through a list from one end to another.

A)binary search
C)linear search
B)array search
D)midpoint search
Question
Users enter incorrect data frequently; a good program should be able to handle the mistake and not allow the ____ to be out of bounds.

A)subscript
C)range
B)superscript
D)variable
Question
A ____ is any series of contiguous values between specified limits.

A)parallel array
C)bounded series
B)range of values
D)subscript search
Question
If an array has valid subscripts from 0 to 4, the size of the array is ____________________.
Question
All of the variables in an array have the same name and data type but are differentiated with special numbers called ____________________.
Question
When you search a list from one end to the other, it is called a(n) ____________________ search.
Question
A(n) ____________________ is a variable set to indicate whether some event has occurred.
Question
A(n) ____________________ is out of bounds when it is not in the range of acceptable values.
Question
____________________ arrays are most useful when value pairs have an indirect relationship.
Question
A(n) ____________________ search starts looking in the middle of a sorted list then determines whether it should continue higher or lower.
Question
Arrays are often useful for replacing ____________________ decisions.
Question
____________________ arrays are two or more arrays in which each element in one array is associated with the element in the same relative position in the other array(s).
Question
The first subscript in an array is ____________________.
Question
Subscripts are always a sequence of ____________________.
Question
____________________ the array involves providing values for elements of the array.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Arrays
1
Arrays are always composed of elements of the same data ____.

A)type
C)method
B)style
D)mode
A
2
Some programmers refer to an array as a table, or a ____.

A)catalog
C)matrix
B)template
D)list
C
3
A ____, also called an index, is a number that indicates the position of a particular item within an array.

A)superscript
C)placeholder
B)key
D)subscript
D
4
An error commonly made by beginning programmers is to forget that array subscripts start with the integer 1.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
As with a while loop, when you use a for loop, you must be careful to stay within array bounds, remembering that the highest usable array subscript is one less than the size of the array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Depending on the syntax rules of the programming language you use, you place the subscript within parentheses or square brackets following the group name.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Many programming languages allow you to initialize an array with fewer values than there are array elements declared.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Sometimes the values stored in arrays should be constants.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Leaving a loop as soon as a match is found improves the program's efficiency.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Any array's subscripts are always a sequence of ____.

A)alphanumeric characters
C)links
B)symbols
D)integers
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
If you store important papers in a series of file folders and label each folder with a consecutive letter of the alphabet, then you are using the equivalent of an array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Whenever you require ____ storage locations for objects, you are using a real-life counterpart of a programming array.

A)multiple
C)stacked
B)fixed
D)expandable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
A flag is a variable you set to indicate whether some event occurred.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Each variable within an array has the same name and the same data type.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
What is another word for a subscript?

A)superscript
C)variable
B)subroutine
D)index
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Parallel arrays are two arrays such that each element in one array is associated with the element in the same relative position in the other array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Each separate array variable is one ____ of an array.

A)element
C)factor
B)block
D)aspect
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
All array elements have the same ____ name, but each individual element also has a unique subscript indicating how far away it is from the first element.

A)variable
C)superscript
B)group
D)value
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
A(n) ____ is a series or list of variables in computer memory, all of which have the same name and data type but are differentiated with special numbers called subscripts.

A)collection
C)script
B)array
D)group
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Each array element occupies an area in memory next to, or ____, the others.

A)coupled with
C)contiguous to
B)associated with
D)parallel with
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Providing array values is also called ____________________ the array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
In Visual Basic, if you declare an array named count, its size is stored in what constant?

A)count.size
C)count.length
B)count.Length
D)count.ElementNumber
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The ____________________ is considered to be one of the most useful data structures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Two corresponding arrays are known as ____ arrays when each element in one array is associated with the element in the same relative position in the other array.
a.perpendicular
c.similar
b.parallel
d.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Using an array is never ____.

A)mandatory
C)a good idea
B)optional
D)easy to understand
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A ____ is a variable that you set to indicate whether some event has occurred.

A)banner
C)sentinel
B)sentry
D)flag
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
In C++ and C#, which type of punctuation is used to hold the array's subscript following the group name?

A)square brackets
C)parenthesis
B)asterisks
D)quotes
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
When you use a subscript not within the range of acceptable subscripts, your subscript is said to be ____.

A)out of range
C)out of bounds
B)out of area
D)out of series
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
To access an array element in Java, you place the subscript inside ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The highest usable array subscript is ____.

A)twice the size of the array
C)one more than the size of the array
B)the size of the array
D)one less than the size of the array
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
matching
ANS: B PTS: 1 REF: 175
Leaving a loop as soon as a match is found ____ a program's efficiency.

A)worsens
C)doesn't change
B)improves
D)defines
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
When you declare an array, you provide a(n) ____ name for a number of associated variables in memory.

A)permanent
C)group
B)immutable
D)standard
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Every array has a(n) ____ size.

A)finite
C)indefinite
B)infinite
D)large
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Initializing an array with a number of elements ____ the array's size is not allowed in any programming language.

A)fewer than
C)greater than or equal to
B)more than
D)less than or equal to
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
An array can best be used to replace what type of structure?

A)flowchart
C)sequence
B)selection
D)nested decision
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
A(n) ____ is the process of searching through a list from one end to another.

A)binary search
C)linear search
B)array search
D)midpoint search
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Users enter incorrect data frequently; a good program should be able to handle the mistake and not allow the ____ to be out of bounds.

A)subscript
C)range
B)superscript
D)variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
A ____ is any series of contiguous values between specified limits.

A)parallel array
C)bounded series
B)range of values
D)subscript search
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
If an array has valid subscripts from 0 to 4, the size of the array is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
All of the variables in an array have the same name and data type but are differentiated with special numbers called ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
When you search a list from one end to the other, it is called a(n) ____________________ search.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
A(n) ____________________ is a variable set to indicate whether some event has occurred.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
A(n) ____________________ is out of bounds when it is not in the range of acceptable values.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
____________________ arrays are most useful when value pairs have an indirect relationship.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
A(n) ____________________ search starts looking in the middle of a sorted list then determines whether it should continue higher or lower.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Arrays are often useful for replacing ____________________ decisions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
____________________ arrays are two or more arrays in which each element in one array is associated with the element in the same relative position in the other array(s).
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
The first subscript in an array is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Subscripts are always a sequence of ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
____________________ the array involves providing values for elements of the array.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.