9.3.1. Arrays-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


Arrays-WE3-P1

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;
You have attempted of activities on this page