Question
Question 39 When an array is passed to a function, it is actually ________ the array that is passed. the starting memory address of a
Question 39
When an array is passed to a function, it is actually ________ the array that is passed.
the starting memory address of | ||
a copy of all the values in | ||
the value stored in the first element of | ||
the data type and size of | ||
the data type and name of |
2 points
Question 40
When an array is passed as an argument to a function, the function can modify the contents of the array.
True
False
2 points
Question 41
A two-dimensional array can be viewed as
two rows of values. | ||
two columns of indexes. | ||
a table with rows and columns. | ||
any of the above. | ||
none of the above. |
2 points
Question 42
True/False: A one-dimensional array can only store elements of a single data type, but a two-dimensional array can hold data of two different data types.
True
False
2 points
Question 43
An array of 10 integers named arr can have its contents displayed with which of the following statements?
cout << arr; | ||
cout << arr[]; | ||
cout << arr[10]; | ||
cout << arr[0-9]; | ||
none of the above |
2 points
Question 44
If the size declarator is omitted in an array declaration
the array will contain no elements. | ||
the array size defaults to 100 elements. | ||
the value of each array element is set to a default value of 0. | ||
the declaration must have an initialization list. | ||
the array cannot be created. |
2 points
Question 45
The statement typedef int oneDArray[20]; does which of the following?
creates an array of 20 integers | ||
makes oneDArray a copy of another 20-integer array | ||
makes oneDArray an alias for a data type that holds 20 integers | ||
creates a one-dimensional integer array with all elements initialized to 20 | ||
none of the above |
2 points
Question 46
When an object instance is passed to a function as a constant reference
the function accesses the original object, rather than a copy of it. | ||
the function cannot make any changes to the member variables. | ||
it is more efficient than passing it by value. | ||
all of the above are true. | ||
A and B are true, but not C. |
2 points
Question 47
The following statement adds a new element to the department vector at index 25:department.push_back(25);
True
False
2 points
Question 48
Assuming 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
2 points
Question 49
A copy constructor is used when objects are passed by reference.
True
False
2 points
Question 50
If iter is an iterator for a map of type map
2 points
Question 51
Write the destructor prototype for the class Station.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started