Exam 7: Arrays and Vectors

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

In C++11 the range-based for loop is best used in situations where you need the element subscript for some purpose.

(True/False)
4.8/5
(39)

Given the following declaration, where is the value 77 stored in the scores array? Int scores[] = {83, 62, 77, 97, 86}

(Multiple Choice)
4.7/5
(42)

Each individual element of an array can be accessed by the array name and the element subscript.

(True/False)
4.9/5
(44)

Which of the following is a valid C++ array definition?

(Multiple Choice)
4.9/5
(35)

What does the following statement do? Vector<int> v(10, 2);

(Multiple Choice)
4.8/5
(42)

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

(Multiple Choice)
4.8/5
(32)

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

(True/False)
4.9/5
(37)

Subscript numbering in C++

(Multiple Choice)
4.9/5
(38)

How many elements does the following array have? Int values[1000];

(Multiple Choice)
5.0/5
(38)

This vector function removes an item from a vector.

(Multiple Choice)
4.8/5
(31)

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

(True/False)
4.8/5
(32)

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

(Multiple Choice)
4.7/5
(39)

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

(Multiple Choice)
4.8/5
(36)

The name of an array stores the __________ of the first array element.

(Multiple Choice)
5.0/5
(30)

When writing functions that accept multi-dimensional arrays as arguments, __________ must be explicitly stated in the parameter list.

(Multiple Choice)
4.8/5
(39)

If you attempt to store data past an array's boundaries, it is guaranteed to cause a compiler error.

(True/False)
4.9/5
(45)
Showing 41 - 56 of 56
close modal

Filters

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