An array can easily be stepped through by using a a


1. What will the following code display?

int numbers[4] = { 99, 87 };

cout << numbers[3] << endl;

A) This code will not compile

B) 87

C) garbage

D) 0

2.To pass an array as an argument to a function, pass the _________ of the array.

A) None of these

B) size, expressed as an integer

C) contents

D) name

E) value of the first element

3. True/False: The statement

double money[25.00];

is a valid C++ array definition.

A) True

B) False

4. A two-dimensional array can be viewed as ___________ and _____________.

A) rows, columns

B) increments, decrements

C) All of these

D) None of these

E) arguments, parameters

5. Which of the following is a valid C++ array definition?

A) int scores[0];

B) int readings[4.5];

C) None of these

D) float $payments[10];

E) int scores [10];

6. True/False: Each individual element of an array can be accessed by the array name and an

element number, called a subscript.

A) True

B) False

7. Unlike regular variables, these can hold multiple values.

A) named constants

B) None of these

C) constants

D) arrays

E) floating-point variables

8. When writing functions that accept multi-dimensional arrays as arguments,

_______________ must be explicitly stated in the parameter list.

A) all dimensions

B) the size declarator of the first dimension

C) None of these

D) all element values

E) all but the first dimension

9. An array can easily be stepped through by using a

A) null value

B) reference variable

C) None of these

D) named constant

E) for loop

10. Arrays may be ___________ at the time they are __________.

A) initialized, declared

B) pre-compiled, typecast

C) re-scoped, deleted

D) resized, executed

E) None of these

Request for Solution File

Ask an Expert for Answer!!
Other Subject: An array can easily be stepped through by using a a
Reference No:- TGS0602712

Expected delivery within 24 Hours