# Subgoals

## Section10.9Arrays-WE3-P1

### Subgoals for Evaluating Arrays.

1. Set up array from 0 to size-1
2. Evaluate data type of statements against array
3. Trace statements, updating slots as you go
1. Remember assignment subgoals

### Subsection10.9.1

#### ExercisesExercises

##### 1.
Q31: Assume the following given declarations:
int [] beta = {12, 24, 36, 48, 60};

Evaluate these statements:
beta = beta - beta + 6;
beta = beta[beta % beta];
beta = beta[beta/beta-1];

Give the contents of array beta after the execution of the above statements:
beta =
beta =
beta =
beta =
beta =
For questions 32-36, give the contents of alpha after the execution of these statements.
int [] alpha = {2, 4, 6, 8, 10};
for (int i = 8; i >= 0; i-=2)
alpha[i/2] = i/2 + 1;

##### 2.
Q32: Enter the values of alpha in the blanks. The value of alpha is .
##### 3.
Q33: Enter the values of alpha in the blanks. The value of alpha is .
##### 4.
Q34: Enter the values of alpha in the blanks. The value of alpha is .
##### 5.
Q35: Enter the values of alpha in the blanks. The value of alpha is .
##### 6.
Q36: Enter the values of alpha in the blanks. The value of alpha is .