Exam 7: Arrays and Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Because array subscripts start at 1 rather than 0, you are not as likely to perform an off-by-one error.

(True/False)
4.9/5
(42)

When you create a numeric array in C#, what value are its elements set to by default?

(Multiple Choice)
4.7/5
(33)

Which one of the following statements is not a valid array declaration?

(Multiple Choice)
5.0/5
(38)

A(n) ____________ occurs when a loop iterates one time too many or one time too few.

(Multiple Choice)
4.8/5
(40)

A two-dimensional array can be thought of as having rows and columns of elements.

(True/False)
4.8/5
(34)

Writing the contents of an array to a file is a straightforward procedure: Open the file and use a loop to step through each element of the array, writing its contents to the file.

(True/False)
4.8/5
(40)

An exception will occur if the specified index is less than 0 or greater than the List object's Count property.

(True/False)
4.8/5
(30)

When only a reference of an object is copied and not the contents of the object itself, it is called a(n) ____________.

(Multiple Choice)
4.8/5
(38)

You can use the ____________ to insert an item at a specific index in a List.

(Multiple Choice)
4.8/5
(42)

To sum all the elements of a two-dimensional array, you can use a pair of nested if statements to add the contents of each element to the accumulator.

(True/False)
4.8/5
(42)

A(n) ____________ is similar to a two-dimensional array, but the rows can have a different number of columns.

(Multiple Choice)
4.9/5
(33)

Because subscript numbering starts at 0, the subscript of the last element in an array is 1 less than the total number of elements in the array.

(True/False)
4.8/5
(37)

The only requirement for the binary search is that the values in the array must be sorted in ascending order.

(True/False)
4.9/5
(30)

In C#, all arrays have a(n) ____________ that is set to the number of elements in the array.

(Multiple Choice)
4.8/5
(35)

If you know the value of the item that you want to remove from a List, but you do not know the item's index, you can use the ____________.

(Multiple Choice)
4.8/5
(45)

Look at the following code sample: Look at the following code sample:   What value will the highest variable contain when the loop finishes? What value will the highest variable contain when the loop finishes?

(Multiple Choice)
4.8/5
(37)

A(n) ____________ is a special value that links a variable to an object.

(Multiple Choice)
5.0/5
(32)

List objects, like arrays, are always passed to a method ____________.

(Multiple Choice)
4.7/5
(39)

The foreach loop is designed to work with a temporary, read-only variable known as the ____________.

(Multiple Choice)
4.8/5
(44)

When you process a(n) ____________, you must process only the elements that contain valid items.

(Multiple Choice)
4.8/5
(41)
Showing 41 - 60 of 99
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)