Deck 6: Using Arrays

ملء الشاشة (f)
exit full mode
سؤال
Arrays are useful when you need to store just one value in memory at a time.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The ____ operator is used to create objects.

A) new
B) save
C) initialize
D) reserve
سؤال
When you declare objects, their numeric fields initialize to ____.

A) null
B) '\u0000'
C) 0
D) false
سؤال
The ____ method arranges array items in ascending order.

A) Reverse()
B) BinarySearch()
C) Order()
D) Sort()
سؤال
You can assign nondefault values to array elements at declaration by specifying a list of values called a(n) ____.

A) value specification
B) array specification
C) initializer list
D) array initializer
سؤال
An array subscript can be an expression, as long as the expression evaluates to type ____.

A) int
B) float
C) double
D) boolean
سؤال
You can easily navigate through arrays using a for or while loop that varies a subscript from 0 to ____.

A) Array.Length - 2
B) Array.Length - 1
C) Array.Length
D) Array.Length + 1
سؤال
In C#, an array's elements are numbered beginning with 1.
سؤال
A search in which each array element is examined in order is called a ____ search.

A) sequential
B) parallel
C) binary
D) range match
سؤال
When you declare objects, their character fields initialize to ____.

A) ' '
B) false
C) 0
D) null
سؤال
In C#, arrays are objects.
سؤال
The ____ method can find the array position of a requested value in an array that is sorted with its elements in ascending order.

A) Sort()
B) BinarySearch()
C) Reverse()
D) IndexOf()
سؤال
When you instantiate an array, you can choose its location in memory.
سؤال
The power of arrays becomes apparent when you use subscripts that are variables rather than constant values.
سؤال
When you declare objects, their bool fields initialize to ____.

A) null
B) false
C) true
D) '\u0000'
سؤال
C# supports a ____ statement that you can use to cycle through every array element without using a subscript.

A) for
B) while
C) do-while
D) foreach
سؤال
With the foreach statement, you provide a temporary ____ that automatically holds each array value in turn.

A) iteration variable
B) index holder
C) subscript holder
D) iteration holder
سؤال
You can distinguish each element from the others in an array with a(n) ____.

A) element operator
B) object location
C) element ID
D) subscript
سؤال
In C#, an array subscript must be type ____.

A) float
B) char
C) int
D) double
سؤال
In an array that has many possible matches of a search value, the most efficient strategy is to place the ____ items first.

A) lowest
B) most unusual
C) highest
D) most common
سؤال
When you instantiate an array, you are creating a specific instance of a class that derives from the built-in class named ____________________.
سؤال
The list of values provided for an array is a(n) ____________________.
سؤال
A ____ array is a one-dimensional array in which each element is another one-dimensional array and each array can be a different length.

A) rectangular
B) matrix
C) jagged
D) table
سؤال
How can you assign nondefault values to array elements when the array is declared? Give an example.
سؤال
Explain how to use a for loop to perform an arithmetic operation on each element in an array.
سؤال
When using an array in a GUI program, if array values will change based on user input, the array must be ____ any method that reacts to the user's event.

A) stored inside
B) reset to 0 in
C) stored outside
D) redeclared in
سؤال
The ____________________ property is a member of the System.Array class and automatically holds an array's length.
سؤال
In a ____ array, each row has the same number of columns.

A) vector
B) rectangular
C) list
D) linear
سؤال
Briefly describe the Reverse() method.
سؤال
A(n) ____________________ array has the same number of elements as an existing array and uses the same subscript to access additional information.
سؤال
Describe the circumstances where you can use the foreach statement.
سؤال
Explain how to use a for loop to search an array for an exact match.
سؤال
To use the Sort() method, you pass the array name to ____.

A) List.Sort()
B) Collections.Sort()
C) Array.Sort()
D) Sort.Sort()
سؤال
A(n) ____________________ is an integer contained within square brackets that indicates the position of one of an array's elements.
سؤال
Under what circumstances does the BinarySearch() method prove inadequate?
سؤال
Explain how to assign a value to a specific array element and how to print it.
سؤال
How can you change the size of an array in C#?
سؤال
Write a small program that uses the Sort() method to sort an array of names into alphabetical order.
سؤال
The ____ method does not sort array elements; it only rearranges their positions to the opposite order.

A) BinarySearch()
B) Opposite()
C) Reverse()
D) Order()
سؤال
An array that you can picture as a column of values, and whose elements you can access using a single subscript, is a ____ array.

A) two-dimensional
B) jagged
C) rectangular
D) single-dimensional
سؤال
Match between columns
Each object in an array
0
Each object in an array
range match
Each object in an array
Reverse() method
Each object in an array
element 0
Each object in an array
matrix
Each object in an array
array element
Each object in an array
multidimensional array
Each object in an array
subscript
Each object in an array
Length - 1
A term used by mathematicians to refer to a two-dimensional array
0
A term used by mathematicians to refer to a two-dimensional array
range match
A term used by mathematicians to refer to a two-dimensional array
Reverse() method
A term used by mathematicians to refer to a two-dimensional array
element 0
A term used by mathematicians to refer to a two-dimensional array
matrix
A term used by mathematicians to refer to a two-dimensional array
array element
A term used by mathematicians to refer to a two-dimensional array
multidimensional array
A term used by mathematicians to refer to a two-dimensional array
subscript
A term used by mathematicians to refer to a two-dimensional array
Length - 1
Determining the pair of limiting values between which another value falls
0
Determining the pair of limiting values between which another value falls
range match
Determining the pair of limiting values between which another value falls
Reverse() method
Determining the pair of limiting values between which another value falls
element 0
Determining the pair of limiting values between which another value falls
matrix
Determining the pair of limiting values between which another value falls
array element
Determining the pair of limiting values between which another value falls
multidimensional array
Determining the pair of limiting values between which another value falls
subscript
Determining the pair of limiting values between which another value falls
Length - 1
The default value of an array's numeric field
0
The default value of an array's numeric field
range match
The default value of an array's numeric field
Reverse() method
The default value of an array's numeric field
element 0
The default value of an array's numeric field
matrix
The default value of an array's numeric field
array element
The default value of an array's numeric field
multidimensional array
The default value of an array's numeric field
subscript
The default value of an array's numeric field
Length - 1
The index of the last element in an array
0
The index of the last element in an array
range match
The index of the last element in an array
Reverse() method
The index of the last element in an array
element 0
The index of the last element in an array
matrix
The index of the last element in an array
array element
The index of the last element in an array
multidimensional array
The index of the last element in an array
subscript
The index of the last element in an array
Length - 1
Reverses the order of items in an array
0
Reverses the order of items in an array
range match
Reverses the order of items in an array
Reverse() method
Reverses the order of items in an array
element 0
Reverses the order of items in an array
matrix
Reverses the order of items in an array
array element
Reverses the order of items in an array
multidimensional array
Reverses the order of items in an array
subscript
Reverses the order of items in an array
Length - 1
Requires multiple subscripts to access array elements
0
Requires multiple subscripts to access array elements
range match
Requires multiple subscripts to access array elements
Reverse() method
Requires multiple subscripts to access array elements
element 0
Requires multiple subscripts to access array elements
matrix
Requires multiple subscripts to access array elements
array element
Requires multiple subscripts to access array elements
multidimensional array
Requires multiple subscripts to access array elements
subscript
Requires multiple subscripts to access array elements
Length - 1
The first element in an array
0
The first element in an array
range match
The first element in an array
Reverse() method
The first element in an array
element 0
The first element in an array
matrix
The first element in an array
array element
The first element in an array
multidimensional array
The first element in an array
subscript
The first element in an array
Length - 1
Also known as an index
0
Also known as an index
range match
Also known as an index
Reverse() method
Also known as an index
element 0
Also known as an index
matrix
Also known as an index
array element
Also known as an index
multidimensional array
Also known as an index
subscript
Also known as an index
Length - 1
سؤال
Describe the main characteristics of two-dimensional arrays. How do you access an element in a two-dimensional array? What are some synonyms for a two-dimensional array?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 6: Using Arrays
1
Arrays are useful when you need to store just one value in memory at a time.
False
2
The ____ operator is used to create objects.

A) new
B) save
C) initialize
D) reserve
A
3
When you declare objects, their numeric fields initialize to ____.

A) null
B) '\u0000'
C) 0
D) false
C
4
The ____ method arranges array items in ascending order.

A) Reverse()
B) BinarySearch()
C) Order()
D) Sort()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
5
You can assign nondefault values to array elements at declaration by specifying a list of values called a(n) ____.

A) value specification
B) array specification
C) initializer list
D) array initializer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
6
An array subscript can be an expression, as long as the expression evaluates to type ____.

A) int
B) float
C) double
D) boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
7
You can easily navigate through arrays using a for or while loop that varies a subscript from 0 to ____.

A) Array.Length - 2
B) Array.Length - 1
C) Array.Length
D) Array.Length + 1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
8
In C#, an array's elements are numbered beginning with 1.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
9
A search in which each array element is examined in order is called a ____ search.

A) sequential
B) parallel
C) binary
D) range match
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
10
When you declare objects, their character fields initialize to ____.

A) ' '
B) false
C) 0
D) null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
11
In C#, arrays are objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
12
The ____ method can find the array position of a requested value in an array that is sorted with its elements in ascending order.

A) Sort()
B) BinarySearch()
C) Reverse()
D) IndexOf()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
13
When you instantiate an array, you can choose its location in memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
14
The power of arrays becomes apparent when you use subscripts that are variables rather than constant values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
15
When you declare objects, their bool fields initialize to ____.

A) null
B) false
C) true
D) '\u0000'
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
16
C# supports a ____ statement that you can use to cycle through every array element without using a subscript.

A) for
B) while
C) do-while
D) foreach
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
17
With the foreach statement, you provide a temporary ____ that automatically holds each array value in turn.

A) iteration variable
B) index holder
C) subscript holder
D) iteration holder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
18
You can distinguish each element from the others in an array with a(n) ____.

A) element operator
B) object location
C) element ID
D) subscript
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
19
In C#, an array subscript must be type ____.

A) float
B) char
C) int
D) double
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
20
In an array that has many possible matches of a search value, the most efficient strategy is to place the ____ items first.

A) lowest
B) most unusual
C) highest
D) most common
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
21
When you instantiate an array, you are creating a specific instance of a class that derives from the built-in class named ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
22
The list of values provided for an array is a(n) ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
23
A ____ array is a one-dimensional array in which each element is another one-dimensional array and each array can be a different length.

A) rectangular
B) matrix
C) jagged
D) table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
24
How can you assign nondefault values to array elements when the array is declared? Give an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
25
Explain how to use a for loop to perform an arithmetic operation on each element in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
26
When using an array in a GUI program, if array values will change based on user input, the array must be ____ any method that reacts to the user's event.

A) stored inside
B) reset to 0 in
C) stored outside
D) redeclared in
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____________________ property is a member of the System.Array class and automatically holds an array's length.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
28
In a ____ array, each row has the same number of columns.

A) vector
B) rectangular
C) list
D) linear
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
29
Briefly describe the Reverse() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
30
A(n) ____________________ array has the same number of elements as an existing array and uses the same subscript to access additional information.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
31
Describe the circumstances where you can use the foreach statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
32
Explain how to use a for loop to search an array for an exact match.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
33
To use the Sort() method, you pass the array name to ____.

A) List.Sort()
B) Collections.Sort()
C) Array.Sort()
D) Sort.Sort()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ____________________ is an integer contained within square brackets that indicates the position of one of an array's elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
35
Under what circumstances does the BinarySearch() method prove inadequate?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
36
Explain how to assign a value to a specific array element and how to print it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
37
How can you change the size of an array in C#?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
38
Write a small program that uses the Sort() method to sort an array of names into alphabetical order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
39
The ____ method does not sort array elements; it only rearranges their positions to the opposite order.

A) BinarySearch()
B) Opposite()
C) Reverse()
D) Order()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
40
An array that you can picture as a column of values, and whose elements you can access using a single subscript, is a ____ array.

A) two-dimensional
B) jagged
C) rectangular
D) single-dimensional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
Each object in an array
0
Each object in an array
range match
Each object in an array
Reverse() method
Each object in an array
element 0
Each object in an array
matrix
Each object in an array
array element
Each object in an array
multidimensional array
Each object in an array
subscript
Each object in an array
Length - 1
A term used by mathematicians to refer to a two-dimensional array
0
A term used by mathematicians to refer to a two-dimensional array
range match
A term used by mathematicians to refer to a two-dimensional array
Reverse() method
A term used by mathematicians to refer to a two-dimensional array
element 0
A term used by mathematicians to refer to a two-dimensional array
matrix
A term used by mathematicians to refer to a two-dimensional array
array element
A term used by mathematicians to refer to a two-dimensional array
multidimensional array
A term used by mathematicians to refer to a two-dimensional array
subscript
A term used by mathematicians to refer to a two-dimensional array
Length - 1
Determining the pair of limiting values between which another value falls
0
Determining the pair of limiting values between which another value falls
range match
Determining the pair of limiting values between which another value falls
Reverse() method
Determining the pair of limiting values between which another value falls
element 0
Determining the pair of limiting values between which another value falls
matrix
Determining the pair of limiting values between which another value falls
array element
Determining the pair of limiting values between which another value falls
multidimensional array
Determining the pair of limiting values between which another value falls
subscript
Determining the pair of limiting values between which another value falls
Length - 1
The default value of an array's numeric field
0
The default value of an array's numeric field
range match
The default value of an array's numeric field
Reverse() method
The default value of an array's numeric field
element 0
The default value of an array's numeric field
matrix
The default value of an array's numeric field
array element
The default value of an array's numeric field
multidimensional array
The default value of an array's numeric field
subscript
The default value of an array's numeric field
Length - 1
The index of the last element in an array
0
The index of the last element in an array
range match
The index of the last element in an array
Reverse() method
The index of the last element in an array
element 0
The index of the last element in an array
matrix
The index of the last element in an array
array element
The index of the last element in an array
multidimensional array
The index of the last element in an array
subscript
The index of the last element in an array
Length - 1
Reverses the order of items in an array
0
Reverses the order of items in an array
range match
Reverses the order of items in an array
Reverse() method
Reverses the order of items in an array
element 0
Reverses the order of items in an array
matrix
Reverses the order of items in an array
array element
Reverses the order of items in an array
multidimensional array
Reverses the order of items in an array
subscript
Reverses the order of items in an array
Length - 1
Requires multiple subscripts to access array elements
0
Requires multiple subscripts to access array elements
range match
Requires multiple subscripts to access array elements
Reverse() method
Requires multiple subscripts to access array elements
element 0
Requires multiple subscripts to access array elements
matrix
Requires multiple subscripts to access array elements
array element
Requires multiple subscripts to access array elements
multidimensional array
Requires multiple subscripts to access array elements
subscript
Requires multiple subscripts to access array elements
Length - 1
The first element in an array
0
The first element in an array
range match
The first element in an array
Reverse() method
The first element in an array
element 0
The first element in an array
matrix
The first element in an array
array element
The first element in an array
multidimensional array
The first element in an array
subscript
The first element in an array
Length - 1
Also known as an index
0
Also known as an index
range match
Also known as an index
Reverse() method
Also known as an index
element 0
Also known as an index
matrix
Also known as an index
array element
Also known as an index
multidimensional array
Also known as an index
subscript
Also known as an index
Length - 1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
42
Describe the main characteristics of two-dimensional arrays. How do you access an element in a two-dimensional array? What are some synonyms for a two-dimensional array?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.