Skip to main content\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 10.9 Arrays-WE3-P1
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
Subsection 10.9.1
Exercises Exercises
1.
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.
3.
4.
5.
6.
You have attempted
of
activities on this page.