Exam 7: Arrays and Lists

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

You can use subscript notation to access items in a List, just as you can with an array.

Free
(True/False)
4.9/5
(40)
Correct Answer:
Verified

True

When you create a numeric array in C#, what default value is assigned to its elements?

Free
(Multiple Choice)
4.7/5
(38)
Correct Answer:
Verified

B

The ____________ algorithm is much more efficient than a sequential search when the data set is very large.

Free
(Multiple Choice)
4.8/5
(30)
Correct Answer:
Verified

C

When working with an array, you cannot use a subscript that is less than 0 or greater than the array size minus 1.

(True/False)
4.8/5
(30)

Each item stored in a List has a corresponding index.

(True/False)
4.9/5
(38)

Various techniques known as ____________ have been developed to locate a specific item in a larger collection of data, such as an array.

(Multiple Choice)
4.8/5
(33)

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

(Multiple Choice)
4.9/5
(39)

Look at the following code sample: const int ROWS = 8; Const int COLS = 2; Int[,] table = new int[ROWS, COLS]; Which one of the following statements stores the value 25 in the element located at the first row and second column of the table array?

(Multiple Choice)
5.0/5
(32)

With what value should the accumulator variable be initialized to calculate the total of all values in a numeric array?

(Multiple Choice)
4.9/5
(37)

It is preferred practice to use a(n) ____________ as an array's size declarator.

(Multiple Choice)
4.9/5
(36)

The first step in calculating the average of all values in a numeric array is to get the total of the values, and the second step is to multiply the total by the number of elements in the array.

(True/False)
4.8/5
(31)

To access a single element in a two-dimensional array, you must use two subscripts.

(True/False)
4.9/5
(37)

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

(Multiple Choice)
4.8/5
(39)

The primary advantage of the binary search algorithm is simplicity, but its primary disadvantage, however, is inefficiency.

(True/False)
4.8/5
(36)

Which one of the following declaration statements is not a value type?

(Multiple Choice)
5.0/5
(30)

You can use the == operator to compare two array reference variables and determine whether the array contents are equal.

(True/False)
4.9/5
(29)

The .NET Framework provides a class named Container, which can be used for storing and retrieving items.

(True/False)
4.8/5
(37)

Arrays are always passed by value when passed as method arguments.

(True/False)
4.7/5
(34)

The ____________ uses a loop to step through the elements in an an array one by one, from the first to the last.

(Multiple Choice)
4.8/5
(40)

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.9/5
(40)
Showing 1 - 20 of 99
close modal

Filters

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