Exam 8: Arrays

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

A two-dimensional array can be viewed as

(Multiple Choice)
4.8/5
(35)

If employee is an array of objects with a public member function named setHoursWorked, which of the following statements correctly calls that function for the employee object in array element 5?

(Multiple Choice)
4.8/5
(38)

If employee is an array of objects with a public member function named setHourlyWage, the following statement correctly calls this method for employee[2]. employee.setHourlyWage[2](20.00);

(True/False)
4.8/5
(41)

By using the same ________ you can build relationships between data stored in two or more arrays.

(Multiple Choice)
4.8/5
(36)

The range-based for loop may be used with arrays, but not with vectors.

(True/False)
4.8/5
(36)

In C++ If you attempt to store more data in an array than it can hold, the compiler will issue an error.

(True/False)
4.8/5
(27)

An individual array element can be processed or passed to a function just like a regular C++ variable.

(True/False)
4.8/5
(32)

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

(True/False)
4.9/5
(38)

To add up all the values in a two-dimensional array it would be best to use

(Multiple Choice)
5.0/5
(36)

Which of the following statements correctly initialize the value variable?

(Multiple Choice)
4.8/5
(24)

Unlike regular variables, arrays can hold multiple

(Multiple Choice)
4.7/5
(28)

If the scores array is defined like this: int scores[ ]= {4, 7, 4, 8, 9}; What will the following statement display? Cout << scores[4];

(Multiple Choice)
4.9/5
(35)

Arrays can be passed to functions, but individual array elements cannot be.

(True/False)
4.7/5
(37)

The following two arrays string deptName[3] = {"Manufacturing", "Sales", "Business Office"); Double deptBudget[3] = {200000.0, 60000.0, 50000.0}; Are an example of ________ arrays.

(Multiple Choice)
4.8/5
(38)

When an array is passed to a function, it is actually ________ the array that is/are passed.

(Multiple Choice)
4.9/5
(32)

The statement int grades[ ] = { 100, 90, 99, 80 }; Is an example of

(Multiple Choice)
4.8/5
(37)

Which of the following statements will correctly carry out the operation stated in the comment to its right.

(Multiple Choice)
4.8/5
(35)

Subscript numbering in C++

(Multiple Choice)
4.9/5
(35)

An element of a two-dimensional array is referenced by the array name and two subscripts, first the element row number and then the element column number.

(True/False)
4.9/5
(39)

The amount of memory used by an array depends upon the array's data type and how many elements it can hold.

(True/False)
4.9/5
(42)
Showing 21 - 40 of 40
close modal

Filters

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