9.2.2. Arrays-WE2-P2ΒΆ
Subgoals for Evaluating Arrays
Set up array from 0 to size-1
Evaluate data type of statements against array
Trace statements, updating slots as you go
Remember assignment subgoals
Arrays-WE2-P2
Assume the following given declarations:
int [] beta;
Give the contents of alpha after the execution of these statements.
beta = new int[6];
beta[0] = 50;
for (int i = 1; i < 6; i++)
beta[i] = beta[i-1];
Q14: The value of beta[0] is |blank|
.
Q15: The value of beta[1] is |blank|
.
Q16: The value of beta[2] is |blank|
.
Q17: The value of beta[3] is |blank|
.
Q18: The value of beta[4] is |blank|
.
Q19: The value of beta[5] is |blank|
.
You have attempted of activities on this page