Exam 7: Arrays

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

A vector object automatically expands in size to accommodate the items stored in it.

Free
(True/False)
4.8/5
(93)
Correct Answer:
Verified

True

In C++ 11, you cannot use a range-based for loop to modify the contents of an array unless you declare the range variable as a reference.

Free
(True/False)
4.8/5
(84)
Correct Answer:
Verified

True

Which statement correctly defines a vector object for holding integers?

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

D

To assign the contents of one array to another, you must use ________.

(Multiple Choice)
4.9/5
(79)

To access an array element, use the array name and the element's ________.

(Multiple Choice)
4.8/5
(85)

An array with no elements is ________.

(Multiple Choice)
4.7/5
(61)

How many elements does the following array have? How many elements does the following array have?

(Multiple Choice)
4.9/5
(76)

An array can store a group of values, but the values must be:

(Multiple Choice)
4.9/5
(77)

The ________ is automatically appended to a character array when it is initialized with a string constant.

(Multiple Choice)
4.8/5
(70)

It is ________ to pass an argument to a function that contains an individual array element, such as numbers[3].

(Multiple Choice)
4.9/5
(83)

An element of a two-dimensional array is referred to by ________ followed by ________.

(Multiple Choice)
4.8/5
(86)

A two-dimensional array can be viewed as ________ and ________.

(Multiple Choice)
4.9/5
(84)

This vector function returns the number of elements in a vector.

(Multiple Choice)
4.8/5
(79)

The amount of memory used by an array depends upon the array's data type and the number of elements in the array.

(True/False)
4.9/5
(89)

Unlike regular variables, these can hold multiple values.

(Multiple Choice)
4.9/5
(91)

A(n)________ can be used to specify the starting values of an array.

(Multiple Choice)
4.8/5
(65)

Assume array1 and array2 are the names of arrays. To assign the contents of array2 to array1, you would use the following statement. array1 = array2;

(True/False)
4.9/5
(90)

A two-dimensional array is like ________ put together.

(Multiple Choice)
4.8/5
(73)

This vector function removes an item from a vector.

(Multiple Choice)
4.9/5
(80)

What will the following code display? What will the following code display?

(Multiple Choice)
5.0/5
(82)
Showing 1 - 20 of 58
close modal

Filters

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