Exam 7: Class Templates Array and Vector; Catching Exceptions

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

You can sort an array with the Standard Library's:

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

A

Linear search can be used on:

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

D

In a typical nested for loop (not a range-based for loop) used to process a two-dimensional array, following the end of each execution of the inner for loop:

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

B

Referencing elements outside the array bounds with the [] operator:

(Multiple Choice)
4.7/5
(36)

Assume that the array named items contains the integer values 0, 2, 4, 6 and 8. Which of the following set of statements uses the range-based for loop to display each value in items?

(Multiple Choice)
4.8/5
(43)

Which of the following is not a correct way to initialize the array named n?

(Multiple Choice)
4.9/5
(40)

Which statement about exception handling is false?

(Multiple Choice)
4.8/5
(44)

Using square brackets ([]) to retrieve vector elements __________ perform bounds checking; using member function at to retrieve vector elements __________ perform bounds checking.

(Multiple Choice)
4.8/5
(31)

Which of the following tasks cannot be performed using a range-based for loop?

(Multiple Choice)
4.9/5
(33)

Which of the following is false?

(Multiple Choice)
4.9/5
(40)

An array is not:

(Multiple Choice)
4.8/5
(37)

A double subscripted array declared as array<array<int, 5>, 3> values; has how many elements?

(Multiple Choice)
4.8/5
(26)

When using exception handling, place any code that might throw an exception in a __________.

(Multiple Choice)
4.8/5
(39)

Which of the following is not true of class template vector?

(Multiple Choice)
4.9/5
(37)

Which of the following does not declare a 2-by-2 array and set all four of its elements to 0?

(Multiple Choice)
4.8/5
(32)

Constant variables:

(Multiple Choice)
4.9/5
(37)

In order to calculate the __________ of an array of values, the array values must first be summed.

(Multiple Choice)
4.9/5
(37)

Which statement would be used to declare a 10-element integer array c?

(Multiple Choice)
5.0/5
(42)
close modal

Filters

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