C# [ch 6]
What can be used to distinguish each element from the others in an array?
a subscript
When you declare an object, what are the bool fields initialized to?
false
What statement, supported by C#, allows you to cycle through every array element without using a subscript?
foreach
What can you use to assign a list of nondefault values to array elements at declaration?
initializer list
An array subscript can be an expression, but only as long as the expression evaluates to what type?
int
With the foreach statement, what is used to automatically hold each array value through each iteration of the loop?
iteration variable
What operator is used for the purpose of creating objects in C#?
new
When you declare an object, what are the numeric fields initialized to?
0
What will be the highest subscript value possible for an array with 15 elements?
14
When an array is initialized with the "double" keyword, how large is each element of the array?
8 bytes
Navigation through an array using a for or while loop can be done by varying a subscript from 0 to what value?
Array.Length - 1
In order to use the Sort() method, what must the array name be passed to?
Array.Sort( )
What method can be used to find the array position of a requested value in an array by repeatedly splitting the list of objects until a match is found, but only if the array is sorted in ascending order?
BinarySearch( )
How can the Array methods such as BinarySearch() and Sort() be used without constantly referencing the Array class name?
Issue a "using static System.Array( );" statement
When using an array in a GUI program, if array values will change based on user input, where must the array be stored?
It must be stored outside the method that processes the user's events
What method does not sort array elements, but rather rearranges their positions to the opposite order?
Reverse( )
What C# method should you use in order to arrange an array in ascending order?
Sort( )
Given an array that has many possible matches of a search value, what is the most efficient strategy for placement of items?
The items should be sorted with the most common items first
In C#, what must an array subscript be?
an integer
What type of one dimensional array contains another one dimensional array in each element, with each array capable of being a different length?
jagged
When you declare an object, what are the character fields set to?
null
What type of array has the same number of elements and corresponding data with another array?
parallel array
What type of array utilizes the same number of columns in each row?
rectangular
What type of search is performed when each array element is examined in order?
sequential
An array that you can picture as a column of values, and whose elements you can access using a single subscript, is what type of array?
single-dimensional