Exam 7: Arrays and Lists

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

When only a reference to an object is copied rather than the object's contents, the copy is called a(n) ____________.

(Multiple Choice)
5.0/5
(28)

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

(Multiple Choice)
4.8/5
(35)

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

(True/False)
4.8/5
(39)

When reading the contents of a file into an array, your loop should always iterate until the array is full.

(True/False)
4.9/5
(33)

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

(Multiple Choice)
4.9/5
(49)

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

(Multiple Choice)
4.8/5
(33)

To write the contents of an array to a file, open the file and use a loop to step through each array element, writing it to the file. Then close the file.

(True/False)
4.9/5
(34)

Data types in C# − and the underlying .NET Framework − fall into two categories: value types and reference types.

(True/False)
4.7/5
(35)

A search algorithm is a technique for scanning through an array and rearranging its contents in some specific order.

(True/False)
4.8/5
(39)

The first element in an array is assigned subscript 1, the second element is assigned subscript 2, and so on.

(True/False)
4.8/5
(35)

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

(Multiple Choice)
4.9/5
(37)

Each element in an array is identified by a unique number known as a(n) ____________.

(Multiple Choice)
4.9/5
(31)

Look at the following code sample: int[] numbers = { 1, 2, 3, 4, 5 }; Int highest = numbers[0]; For (int index = 1; index < numbers.Length; index++) { If (numbers[index] > highest) { Highest = numbers[index]; } } What value will the highest variable contain when the loop finishes?

(Multiple Choice)
4.8/5
(39)

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

(Multiple Choice)
4.8/5
(28)

An array's____________ indicates the number of values that the array should be able to hold.

(Multiple Choice)
5.0/5
(47)

The default value of a string array's elements is null.

(True/False)
4.7/5
(43)

Reference variables can only reference objects.

(True/False)
4.9/5
(40)

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 you would with a regular for loop.

(True/False)
4.7/5
(33)

To add items to an existing List object, use the ____________.

(Multiple Choice)
4.8/5
(35)

Of the following statements, which one correctly initializes an int array named quarters with the values 1, 2, 3, and 4?

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

Filters

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