Exam 7: Arrays and Lists

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

You access the individual elements in an array by using their subscripts.

(True/False)
4.8/5
(37)

A variable that is used to reference an object is commonly called a(n) ____________.

(Multiple Choice)
4.6/5
(30)

A partially filled array is normally used with an accompanying integer variable that holds the number of items that are actually stored in the array.

(True/False)
4.8/5
(29)

____________ arrays can only hold one set of data.

(Multiple Choice)
4.9/5
(31)

Which one of the following assignment statements associates an int array, that can hold 12 integers, with a reference variable named scores?

(Multiple Choice)
4.7/5
(43)

Which one of the following statements creates a List object, named friendsList, that can be used to hold strings?

(Multiple Choice)
4.8/5
(32)

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

(True/False)
4.9/5
(37)

If you want to make a copy of an array, you must create the second array in memory and then copy the individual elements of the first array to the second.

(True/False)
4.9/5
(36)

You can create an array to hold any one type of value.

(True/False)
4.8/5
(26)

Unlike a one-dimensional array, you cannot provide an initialization list for a two-dimensional array.

(True/False)
4.8/5
(44)

When you create an array, you can optionally initialize it with a group of values called a(n) ____________.

(Multiple Choice)
4.9/5
(43)

Traditional two-dimensional arrays, where each row has the same number of columns, are sometime referred to as ____________.

(Multiple Choice)
4.8/5
(45)

To successfully ____________ the contents of two variables, we need a third variable that can serve as a temporary storage location.

(Multiple Choice)
4.9/5
(31)

Because the foreach loop automatically knows the number of elements in an array, you do not have to use a counter variable to control its iterations, as with a regular for loop.

(True/False)
4.8/5
(48)

____________ is a process that periodically runs, removing all unreferenced objects from memory.

(Multiple Choice)
5.0/5
(39)

Arrays are reference type objects.

(True/False)
4.9/5
(36)

The ____________ is a clever algorithm that is much more efficient that the sequential search.

(Multiple Choice)
4.8/5
(44)

To declare a two-dimensional array, two ____________ are required: The first one is for the number of rows, and the second one is for the number of columns.

(Multiple Choice)
4.9/5
(33)

Because variables hold only a single value, they can be cumbersome in programs that process lists of data.

(True/False)
4.8/5
(38)

The ref keyword creates and object in memory and returns a reference to the object it creates.

(True/False)
4.9/5
(43)
Showing 61 - 80 of 99
close modal

Filters

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