Chapter 7: Arrays

¡Supera tus tareas y exámenes ahora con Quizwiz!

____ blocks serve as exception handlers for any exceptions thrown by the statements in the try block.

Catch

The expression getline(cin, message) will continuously accept and store characters typed at the terminal until the ____ key is pressed.

Enter

____ are simply variables used to store memory addresses.

Pointers

To meet the need of providing a tested and generic set of data structures that can be modified, expanded, and contracted, C++ includes a useful set of classes in its ____.

Standard Template Library

When constructing a class in C++, the ____ section declares both the data types and functions for the class.

declaration

The asterisk (*) symbol is also called the ____ operator.

dereferencing

Each item in an array is called a(n) ____ or component of the array.

element

If the integer's address is stored in a pointer, typically only ____ bytes of storage are retrieved when the address is used.

four

The ____ function reads the next character in the input stream and assigns it to the function's character variable.

get()

The ____ keyword specifies that the class members following it can be accessed only by using the class functions.

private

The C language, which is C++'s predecessor, is a(n) ____ language.

procedural

The STL algorithm ____ randomly shuffles element values in a specified range.

random_shuffle

Essentially, a(n) ____ is a named constant for an address.

reference

In contrast to implicitly passing addresses with ____, addresses can be explicitly passed using pointers.

references

In C++, a two-dimensional array is initialized in ____ order.

row

The advantage of using references over using pointers is that the notation is ____.

simpler

When an array is created, the compiler creates an internal point constant for it automatically and stores the array's ____ in this pointer.

starting address

A computer uses an array's ____ to calculate the array element's address based on both the array's starting address and the amount of storage each element uses.

subscript

The element's index or ____ value gives the element's position in the array.

subscript

The process of generating and passing an exception is referred to as ____.

throwing an exception

A(n) ____ array consists of both rows and columns of elements.

two-dimensional

Designating a namespace in the ____ statement tells the compiler to include only the code in the specified namespace rather than all code in the file.

using

To display the address of a variable, you can use C++'s address operator, ____.

&

Assuming ptNum is a pointer, the statement ____ uses the pointer and then increments it.

*ptNum++

A common programming error consists of failing to terminate the class declaration section with a ____ character.

;

The ____ header is required to create one or more vector objects.

<vector>

____ loops are especially useful when dealing with two-dimensional arrays because they allow the programmer to designate and cycle through each element easily.

Nested

A(n) ____ is simply a user-defined type that defines both a type of data and the operations that can be performed on it.

abstract data type

A(n) ____ is any non-constructor member function that accesses a class's private data members.

accessor function

The ____ function enables you to retrieve separate characters in a string.

at()

The STL ____ function returns a value corresponding to the start of the vector.

begin()

Strings can be manipulated by using string class functions or the ____ functions.

character-at-a-time

In C++, an abstract data type is referred to as a(n) ____.

class

Both the variables and functions listed in the class declaration section are collectively referred to as ____.

class members

A ____ function is any function that has the same name as its class.

constructor

In C++, a character is stored as a(n) ____ value.

integer

The ____ method returns the number of characters in the string.

length()

A(n) ____ is any nonconstructor class method that changes an object's data values.

mutator method

Pointers to functions are possible because function ____ are themselves pointer constants.

names

A(n) ____ is a list of related values, all having the same data type, that's stored with a single group name.

one-dimensional array

The ____ function returns the next character on the stream but doesn't remove it from the stream's buffer.

peek()


Conjuntos de estudio relacionados

Chapter 22 The Child with Gastrointestinal Dysfunction Hockenberry

View Set

Medical Genetics and Epigenetics - Ch. 1 - 4

View Set

Honors American History I: Chapter 6 Test-Pt.1

View Set