Question: Question 1 (1 point) Which of the following function declarations correctly expect an array as the first argument? Question 1 options: void f1(int array, int
Question 1 (1 point)

Which of the following function declarations correctly expect an array as the first argument?
Question 1 options:
| void f1(int array, int size); | |
| void f1(int& array, int size); | |
| void f1(int array[100], int size); | |
| void f1(float array[], int size); | |
| All of the above | |
| C and D | |
| A and B |
Save
Question 2 (1 point)

The following array declaration is legal double scores[4]={0.1,0.2,0.3};
Question 2 options:
| True | |
| False |
Save
Question 3 (1 point)
![int size); void f1(int& array, int size); void f1(int array[100], int size);](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f114cbf28c2_53166f114cbe511d.jpg)
Arrays are always passed to a function using
Question 3 options:
| pass by value | |
| pass by reference | |
| pass by array | |
| you cannot pass arrays to a function |
Save
Question 4 (1 point)
![void f1(float array[], int size); All of the above C and D](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f114cc558f9_53266f114cc46a21.jpg)
If you use the const modifier in a function declaration, you do not include it in the function definition.
Question 4 options:
| True | |
| False |
Save
Question 5 (1 point)

The indexed variables (members) of an array must be integers.
Question 5 options:
| True | |
| False |
Save
Question 6 (1 point)
![is legal double scores[4]={0.1,0.2,0.3}; Question 2 options: True False Save Question 3](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f114ccc4d4f_53266f114ccb6d0a.jpg)
The following function declaration guarantees the values in the array argument are not changed in the function. void function1(const int array[], const int numElements);
Question 6 options:
| True | |
| False |
Save
Question 7 (1 point)

In the expression cout
Question 7 options:
| base | |
| key | |
| range | |
| delimiter | |
| index |
Save
Question 8 (1 point)

What are the valid indexes for the array shown below? int myArray[25];
Question 8 options:
| 0-25 | |
| 0-24 | |
| 1-25 | |
| 1-24 |
Save
Question 9 (1 point)

The locations of the various indexed variables in an array can be spread out all over the memory.
Question 9 options:
| True | |
| False |
Save
Question 10 (1 point)

If a function is expecting a pass by reference parameter, you can pass an index variable from an array of the same base type to that function.
Question 10 options:
| True | |
| False |
Save
Question 11 (1 point)

Arrays are always passed to a function using
Question 11 options:
| pass by value | |
| pass by reference | |
| pass by array | |
| you cannot pass arrays to a function |
Save
Question 12 (1 point)

In the expression cout
Question 12 options:
| base | |
| key | |
| range | |
| delimiter | |
| index |
Save
Question 13 (1 point)

What are the valid indexes for the array shown below? int myArray[25];
Question 13 options:
| 0-25 | |
| 0-24 | |
| 1-25 | |
| 1-24 |
Save
Question 14 (1 point)

Arrays can be passed to functions.
Question 14 options:
| True | |
| False |
Save
Question 15 (1 point)
![changed in the function. void function1(const int array[], const int numElements); Question](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f114cf04b72_53466f114ceeb230.jpg)
Why should you use a named constant for the size of an array?
Question 15 options:
| Readability of code | |
| Makes changes to the program easier | |
| Helps reduce logic errors | |
| All of the above |
Save
Question 16 (1 point)

The locations of the various indexed variables in an array can be spread out all over the memory.
Question 16 options:
| True | |
| False |
Save
Question 17 (1 point)

What is wrong with the following code fragment? const int SIZE =5; float scores[SIZE]; for(int i=0; i> scores[i]; }
Question 17 options:
| Array indexes start at 1 not 0 | |
| Arrays must be integers | |
| Array indexes must be less than the size of the array | |
| Should be cin >> scores[0]; |
Save
Question 18 (1 point)

Which of the following function declarations correctly guarantee that the function will not change any values in the array argument?
Question 18 options:
| void f1(int array[], int size) const; | |
| void f1(int array[], int size); | |
| void f1(int &array, int size); | |
| void f1(const int array[], int size); | |
| void f1(int array[], const int size); |
Save
Question 19 (1 point)
![int myArray[25]; Question 8 options: 0-25 0-24 1-25 1-24 Save Question 9](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f114d0239a2_53666f114d01623f.jpg)
The following array declaration is legal double scores[]={0.1, 0.2, 0.3};
Question 19 options:
| True | |
| False |
Save
Question 20 (1 point)

If your index used to access the indexed variables of the array has the value of a non-existent index, this is called _________
Question 20 options:
| illegal const | |
| domain error | |
| out of bounds | |
| segmentation fault | |
| memory leak | |
| buffer overflow |
Save
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
