Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. An array is a list of data items that . a. all have the same type b. all have

ID: 648540 • Letter: 1

Question

1. An array is a list of data items that .
a. all have the same type
b. all have different names
c. all are integers
d. all are null

2. When you declare an array, .
a. you always reserve memory for it in the same statement
b. you might reserve memory for it in the same statement
c. you cannot reserve memory for it in the same statement
d. the ability to reserve memory for it in the same statement
depends on the type of the array

3. You reserve memory locations for an array when you .
a. declare the array name
b. use the keyword new
c. use the keyword mem
d. explicitly store values within the array elements

4. For how many integers does the following statement reserve room?
int[] value = new int[34];
a. 0
b. 33
c. 34
d. 35

5. Which of the following can be used as an array subscript?
a. character
b. double
c. int
d. String

6. If you declare an array as follows, how do you indicate the final element of
the array?
int[] num = new int[6];
a. num[0]
b. num[5]
c. num[6]
d. impossible to tell

7. If you declare an integer array as follows, what is the value of num[2]?
int[] num = {101, 202, 303, 404, 505, 606};
a. 101
b. 202
c. 303
d. impossible to tell

8. Array names represent .
a. values
b. functions
c. references
d. allusions

9. Unicode value

Explanation / Answer

11.b is all of them

2. b. you might reserve memory for it in the same statement

17. c.a copy of the value in the element

18. a. value