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)

Question 1 (1 point) Which of the following function declarations correctly expect

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)

an array as the first argument? Question 1 options: void f1(int array,

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);

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

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)

A and B Save Question 2 (1 point) The following array declaration

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

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)

(1 point) Arrays are always passed to a function using Question 3

In the expression cout

Question 7 options:

base

key

range

delimiter

index

Save

Question 8 (1 point)

options: pass by value pass by reference pass by array you cannot

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)

pass arrays to a function Save Question 4 (1 point) If you

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)

use the const modifier in a function declaration, you do not include

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)

it in the function definition. Question 4 options: True False Save Question

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)

5 (1 point) The indexed variables (members) of an array must be

In the expression cout

Question 12 options:

base

key

range

delimiter

index

Save

Question 13 (1 point)

integers. Question 5 options: True False Save Question 6 (1 point) The

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)

following function declaration guarantees the values in the array argument are not

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

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)

6 options: True False Save Question 7 (1 point) In the expression

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)

cout Question 7 options: base key range delimiter index Save Question 8

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)

(1 point) What are the valid indexes for the array shown below?

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

The following array declaration is legal double scores[]={0.1, 0.2, 0.3};

Question 19 options:

True

False

Save

Question 20 (1 point)

(1 point) The locations of the various indexed variables in an array

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!