Exam 7: Arrays and Vectors

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

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

Free
(Multiple Choice)
4.7/5
(21)
Correct Answer:
Verified

B

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

Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
Verified

D

What does the following code do? Const int SIZE = 5; Double x[SIZE]; For (int i = 2; i <= SIZE; i++) { X[i] = 0.0; }

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

D

The individual values contained in an array are known as

(Multiple Choice)
4.7/5
(36)

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 variable.

(True/False)
4.8/5
(35)

If you leave out the size declarator in an array definition

(Multiple Choice)
4.7/5
(29)

This vector function is used to insert an item into a vector.

(Multiple Choice)
4.9/5
(45)

An individual array element can be processed like any other type of C++ variable.

(True/False)
4.8/5
(41)

Which statement correctly uses C++11 to initalize a vector of ints named n with the values 10 and 20?

(Multiple Choice)
4.8/5
(36)

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

(True/False)
4.9/5
(28)

A two-dimensional array can have elements of __________ data type(s).

(Multiple Choice)
4.7/5
(35)

The following statement is a valid C++ definition: double money[25.00];

(True/False)
4.9/5
(33)

What is the last legal subscript that can be used with the following array? Int values[5];

(Multiple Choice)
4.8/5
(33)

An array initialization must be all on one line.

(True/False)
4.9/5
(37)

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

(Multiple Choice)
4.8/5
(30)

This vector function returns true if the vector has no elements.

(Multiple Choice)
4.9/5
(34)

C++ limits the number of array dimensions to two.

(True/False)
4.9/5
(42)

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

(Multiple Choice)
4.8/5
(36)

An array of string objects that will hold five names would be declared with which of the following statements?

(Multiple Choice)
4.8/5
(30)

To pass an array as an argument to a function, pass the __________ of the array.

(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 56
close modal

Filters

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