Chapter 7

Ace your homework & exams now with Quizwiz!

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

initialization list

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

iteration variable

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

jagged array

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

off by one error

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

partially filled array

_____ is a type of assignment operation that copies a reference to an array and not the contents of the array

reference copy

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

search algorithms

______uses a loop to step through an array, starting with the first element, searching for an item.

sequential search algorithms

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

size declarator

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.

size declarators

Each element in an array is assigned a unique number known as a(n) _________

subscript

Which one of the following statements assigns the value 40 to the first element in an int array named values?

values[0] = 40;

________ arrays can only hold one set of data.

One-dimensional

A(n) ________ is an object that can hold a group of values that are all the same data type.

array

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

0

The storage locations in an array are known as ____

elements

12. C# provides a special loop that, in many circumstances, simplifies array processing. It is known as the _______

foreach loop

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

List<string> friendsList = new List<string>();

A List object has a(n) ________ that holds the number of items stored in the List.

Count property

Individual variables are well suited for storing and processing lists of data.(T or F)

False

You can store a mixture of data types in an array.(T or F)

False

You can use the == operator to compare a 2D array reference variables and determine whether the arrays are equal

False

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

Garbage collection

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

Length property

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

List

A(n) ________ is similar to an array but offers many advantages over an array.

List object

A jagged array is similar to a 2D array, but the rows in jagged can have different numbers of columns

True

Arrays are reference type objects.( T or F)

True

The subscript of the last element will always be one less than the array's length property.( T or F)

True

When you create a list object, you do not have to know the number of items that you intend to store in it

True

When you create a numeric array in C#, its elements are set to value 0 by default(T or F)

True

________ arrays, which are also called 2D arrays, can hold multiple sets of data.

Two-dimensional

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

binary search

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

by reference


Related study sets

2.3 Prefixes and Scientific Notation

View Set

Med Surg: Chapter 53 Sexually Transmitted Infections

View Set

World History 4:2 Activity and Review

View Set

Mastering Correction of Accounting Errors

View Set